From 4c655380d3f6d039c3976bd4dc9eed2ade46296e Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Sat, 26 Oct 2024 15:09:25 -0400 Subject: [PATCH] ci: support pre-releases (#199) Signed-off-by: Chris Gianelloni --- .github/workflows/publish.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 89b8c78..ac98298 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -233,7 +233,7 @@ jobs: docker manifest create ${t} --amend ${t}-amd64 --amend ${t}-arm64v8 docker manifest create ${{ env.GHCR_IMAGE_NAME }}:latest --amend ${t}-amd64 --amend ${t}-arm64v8 done - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') && ! contains('-pre-', github.ref) # Push various manifests - name: push-ghcr run: | @@ -246,7 +246,7 @@ jobs: for t in `echo '${{ steps.meta-ghcr-tag.outputs.tags }}'`; do docker manifest push ${t} done - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') && ! contains('-pre-', github.ref) # Now, create manifests for Docker Hub @@ -261,7 +261,7 @@ jobs: docker manifest create ${t} --amend ${t}-amd64 --amend ${t}-arm64v8 docker manifest create ${{ env.DOCKER_IMAGE_NAME }}:latest --amend ${t}-amd64 --amend ${t}-arm64v8 done - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') && ! contains('-pre-', github.ref) - name: push-dockerhub run: | for t in `echo '${{ steps.meta-dockerhub.outputs.tags }}'`; do @@ -273,7 +273,7 @@ jobs: for t in `echo '${{ steps.meta-dockerhub-tag.outputs.tags }}'`; do docker manifest push ${t} done - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') && ! contains('-pre-', github.ref) # Update Docker Hub from README @@ -302,7 +302,7 @@ jobs: generate_release_notes: true, name: process.env.RELEASE_TAG, owner: context.repo.owner, - prerelease: false, + prerelease: ${{ (startsWith(github.ref, 'refs/tags/') && ! contains('-pre-', github.ref)) && true || false }}, repo: context.repo.repo, tag_name: process.env.RELEASE_TAG, });