Skip to content

Commit

Permalink
devops: fixed the auto-push-docker workflow, correct docker hub
Browse files Browse the repository at this point in the history
  • Loading branch information
cdxker committed Oct 3, 2023
1 parent cc98ec8 commit 139c8d3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/push-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,24 @@ jobs:
uses: actions/checkout@v4

- name: Login to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Docker metadata
id: metadata
uses: docker/metadata-action@v3
with:
images: ${{ env.IMG_NAME }}
tags: |
type=raw,value={{sha}},enable=${{ github.ref_type != 'tag' }}
- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: search/
file: ./Dockerfile
push: true
tags: ${{ vars.GITHUB_SHA }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 139c8d3

Please sign in to comment.