fix(ci): rc handling

This commit is contained in:
Felipe M 2023-09-11 18:44:22 +02:00
parent ef1d18d81f
commit 1d52569731
No known key found for this signature in database
GPG key ID: CCFBC5637D4000A8

View file

@ -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: |