Skip to content

Commit

Permalink
fix(ci): rc handling
Browse files Browse the repository at this point in the history
  • Loading branch information
fmartingr committed Sep 11, 2023
1 parent ef1d18d commit 1d52569
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/_buildx.yml
Expand Up @@ -23,19 +23,27 @@ jobs:
mv binaries/shiori_linux_amd64_v1 binaries/shiori_linux_amd64
gzip -d -S binaries/.gz__ -r .
chmod 755 binaries/shiori_linux_*/shiori
- 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)
if [ -z "$(git tag --points-at HEAD)" ] || [ "$TAG" == *"rc"* ]
if [ -z "$(git tag --points-at HEAD)" ] || [[ "$TAG" == *"rc"* ]]
then
TAG2="dev"
else
TAG2="latest"
fi
echo "tag_flags=--tag $REPO:$TAG --tag $REPO:$TAG2" >> $GITHUB_ENV
- name: Prepare version push tags
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
run: |
REPO=ghcr.io/${{ github.repository }}
TAG=$(git describe --tags)
echo "tag_flags=--tag $REPO:$TAG --tag $REPO:dev" >> $GITHUB_ENV
- name: Prepare pull request tags
if: github.event_name == 'pull_request'
run: |
Expand Down

0 comments on commit 1d52569

Please sign in to comment.