Skip to content

Commit

Permalink
ci: support pre-releases (#199)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Gianelloni <[email protected]>
  • Loading branch information
wolf31o2 authored Oct 26, 2024
1 parent c70f88e commit 4c65538
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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,
});
Expand Down

0 comments on commit 4c65538

Please sign in to comment.