Skip to content

Commit

Permalink
Update Docker image build and push workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ashaffah committed Feb 22, 2024
1 parent d0a0747 commit 6a29ada
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ jobs:

- name: Build and push Docker image
run: |
VERSION=$(git describe --tags --abbrev=0)
docker build -t ashaffah/kode-pos:$VERSION .
docker push ashaffah/kode-pos:$VERSION
if git rev-parse --verify "refs/tags/*" >/dev/null 2>&1; then
VERSION=$(git describe --tags --abbrev=0)
else
VERSION="none"
fi
docker build -t ***/kode-pos:$VERSION .
docker push ***/kode-pos:$VERSION
- name: Set latest version
run: echo "LATEST_VERSION=latest" >> $GITHUB_ENV
Expand Down

0 comments on commit 6a29ada

Please sign in to comment.