Skip to content

Commit

Permalink
test just the git tag check
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Pelletier committed Feb 1, 2024
1 parent f5f80f7 commit a3d195f
Showing 1 changed file with 32 additions and 23 deletions.
55 changes: 32 additions & 23 deletions .github/workflows/webhook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ jobs:
push: false

release:
name: push image
needs: test
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
Expand All @@ -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 }}

0 comments on commit a3d195f

Please sign in to comment.