Skip to content

Commit

Permalink
re-add (updated version of) push-templates-tag to release.yml
Browse files Browse the repository at this point in the history
Unlike the original version, this one does not depend on the Go SDK automation
and instead derives the template tag name from the Spin version tag name.

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
  • Loading branch information
dicej committed Feb 21, 2024
1 parent 1282dd8 commit 65ed372
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,27 @@ jobs:
--title ${{ github.ref_name }} \
--generate-notes ${{ env.PRERELEASE }}
push-templates-tag:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3

- name: Set the tag to spin/templates/v*
shell: bash
run: |
spin_tag=$(echo "${{ github.ref }}" | grep -Eo "refs/tags/v[0-9.]+")
IFS=. read -r major minor patch <<< "${spin_tag}"
echo "TEMPLATE_TAG=spin/templates/$major.$minor" >> $GITHUB_ENV
- name: Tag spin/templates/v* and push it
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git tag ${{ env.TEMPLATE_TAG }} -f
git push origin ${{ env.TEMPLATE_TAG }} -f
## statically linked spin binaries
build-spin-static:
name: Build Spin static
Expand Down

0 comments on commit 65ed372

Please sign in to comment.