-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Andrew Pelletier
committed
Feb 1, 2024
1 parent
f5f80f7
commit a3d195f
Showing
1 changed file
with
32 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,6 @@ jobs: | |
push: false | ||
|
||
release: | ||
name: push image | ||
needs: test | ||
if: github.ref != 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
|
@@ -62,25 +61,35 @@ jobs: | |
- run: echo "VERSION=$(cat version.txt)" >> "$GITHUB_OUTPUT" | ||
id: version-selector | ||
name: generate image name | ||
- run: "! docker manifest inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version-selector.outputs.VERSION }}" | ||
name: confirm image is not already pushed | ||
- uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | ||
with: | ||
context: ${{ env.WORKING_DIR }} | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version-selector.outputs.VERSION }} | ||
- uses: mathieudutour/[email protected] | ||
id: tag_version | ||
with: | ||
custom_tag: ${{ env.TAG_PREFIX }}:${{ steps.version-selector.outputs.VERSION }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ steps.tag_version.outputs.new_tag }} | ||
name: Release ${{ steps.tag_version.outputs.new_tag }} | ||
body: ${{ steps.tag_version.outputs.changelog }} | ||
|
||
# - run: "! docker manifest inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version-selector.outputs.VERSION }}" | ||
# name: confirm image is not already pushed | ||
|
||
- run: | | ||
TAG_NAME=$TAG_PREFIX:v${{ steps.version-selector.outputs.VERSION }} | ||
git rev-parse -q --verify "refs/tags/$TAG_NAME" | ||
name: confirm git tag does not exist | ||
# - uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | ||
# with: | ||
# registry: ${{ env.REGISTRY }} | ||
# username: ${{ github.actor }} | ||
# password: ${{ secrets.GITHUB_TOKEN }} | ||
# | ||
# - uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | ||
# with: | ||
# context: ${{ env.WORKING_DIR }} | ||
# push: true | ||
# tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version-selector.outputs.VERSION }} | ||
# | ||
# - uses: mathieudutour/[email protected] | ||
# id: tag_version | ||
# with: | ||
# custom_tag: ${{ env.TAG_PREFIX }}:${{ steps.version-selector.outputs.VERSION }} | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# | ||
# - uses: ncipollo/release-action@v1 | ||
# with: | ||
# tag: ${{ steps.tag_version.outputs.new_tag }} | ||
# name: Release ${{ steps.tag_version.outputs.new_tag }} | ||
# body: ${{ steps.tag_version.outputs.changelog }} |