Skip to content

Commit

Permalink
Tag Version
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielvarona committed Apr 26, 2024
1 parent c22a5be commit ef369ed
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Get tag without 'v' prefix
id: get_tag
run: echo "::set-output name=tag::${GITHUB_REF#refs/tags/v}" # Remove 'v' prefix from the tag

- name: Extract tag name without 'v' prefix (using script and GITHUB_OUTPUT)
id: extract_version
run: |
tag_version=${GITHUB_REF#refs/tags/v}
if [[ -z "$tag_version" ]]; then
echo "::error:: Pushed tag is not a valid version. Skipping workflow."
exit 1
fi
echo "tag_version=$tag_version" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -41,6 +46,6 @@ jobs:
target: production
tags: |
nathanielvarona/pritunl-slack-app,
nathanielvarona/pritunl-slack-app:${github.actions.github.runNumber.replace('v', '')}
nathanielvarona/pritunl-slack-app:${{ steps.extract_version.outputs.tag_version }}
platforms: linux/amd64,linux/arm64
# push: true

0 comments on commit ef369ed

Please sign in to comment.