Skip to content

Commit

Permalink
fix(ci): prevent tagging docker image as latest on every push (#882)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmartingr committed Apr 8, 2024
1 parent a281543 commit 6254f77
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/_buildx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ jobs:
gzip -d -S binaries/.gz__ -r .
chmod 755 binaries/shiori_linux_*/shiori
# Every pull request that goes into master
- name: Prepare master push tags
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
REPO=ghcr.io/${{ github.repository }}
TAG=$(git describe --tags)
echo "tag_flags=--tag $REPO:$TAG --tag $REPO:latest" >> $GITHUB_ENV
echo "tag_flags=--tag $REPO:$TAG" >> $GITHUB_ENV
# New tagged version
- name: Prepare version push tags
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
run: |
Expand All @@ -44,6 +46,7 @@ jobs:
fi
echo "tag_flags=--tag $REPO:$TAG --tag $REPO:$TAG2" >> $GITHUB_ENV
# Every pull request
- name: Prepare pull request tags
if: github.event_name == 'pull_request'
run: |
Expand Down

0 comments on commit 6254f77

Please sign in to comment.