Skip to content

Commit

Permalink
Update docker tag logic
Browse files Browse the repository at this point in the history
  • Loading branch information
haideriqbal committed May 1, 2024
1 parent 525ea38 commit 554f9ba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,10 @@ jobs:
- name: Build and push zooma Docker image
run: |
docker build -t ghcr.io/ebispot/zooma:${{ github.sha }} .
docker tag ghcr.io/ebispot/zooma:${{ github.sha }} ghcr.io/ebispot/zooma:${{ github.ref_name }}
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
TAG="PR-${{ github.event.pull_request.number }}"
else
TAG="${{ github.ref_name }}"
fi
docker tag ghcr.io/ebispot/zooma:${{ github.sha }} ghcr.io/ebispot/zooma:${TAG}
docker push --all-tags ghcr.io/ebispot/zooma

0 comments on commit 554f9ba

Please sign in to comment.