Skip to content

Commit

Permalink
chore: use short commithash in ghaction
Browse files Browse the repository at this point in the history
  • Loading branch information
ngutech21 committed Jan 18, 2024
1 parent a8a6f46 commit 604bccf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ jobs:
id: date
run: echo "::set-output name=date::$(date -u '+%F-%T')"

- name: Get short SHA
id: sha
run: echo "::set-output name=sha::$(git rev-parse --short HEAD)"

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
build-args: |
COMMITHASH=${{ github.sha }}
COMMITHASH=${{ steps.date.outputs.sha }}
BUILDTIME=${{ steps.date.outputs.date }}
tags: docker.io/${{ secrets.DOCKER_NAME }}/moksha-mint:latest
tags: docker.io/${{ secrets.DOCKER_NAME }}/moksha-mint:latest, docker.io/${{ secrets.DOCKER_NAME }}/moksha-mint:${{ steps.date.outputs.sha }}

0 comments on commit 604bccf

Please sign in to comment.