diff --git a/.github/workflows/_buildx.yml b/.github/workflows/_buildx.yml index addbcb0c37..a6380b151d 100644 --- a/.github/workflows/_buildx.yml +++ b/.github/workflows/_buildx.yml @@ -23,12 +23,13 @@ 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 @@ -36,6 +37,13 @@ jobs: 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: |