From 4495463a74e89f65eeedbaac26117361054532c9 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Thu, 25 Jul 2024 14:15:16 +0100 Subject: [PATCH] ci: use the actual stream-sprout version for tagging container releases --- .github/workflows/publish-release.yml | 7 ++++++- .github/workflows/test-build-stream-sprout.yml | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 341d5fa..dd1890b 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -97,6 +97,11 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Get stream-sprout version 🔢 + id: get_version + run: | + STREAM_SPROUT_VER=$(grep "^readonly VERSION" stream-sprout | cut -d'"' -f2) + echo "STREAM_SPROUT_VER=$STREAM_SPROUT_VER" >> $GITHUB_ENV - name: "Build Container 🐋" uses: docker/build-push-action@v6 with: @@ -105,7 +110,7 @@ jobs: push: true tags: | ghcr.io/${{ github.repository }}:latest-alpine - ghcr.io/${{ github.repository }}:${{ github.ref_name }}-alpine + ghcr.io/${{ github.repository }}:${{ env.STREAM_SPROUT_VER }}-alpine ghcr.io/${{ github.repository }}:${{ github.sha }}-alpine platforms: linux/amd64, linux/arm64 - name: Logout from Container Registry diff --git a/.github/workflows/test-build-stream-sprout.yml b/.github/workflows/test-build-stream-sprout.yml index 07ab7a9..35b6a7c 100644 --- a/.github/workflows/test-build-stream-sprout.yml +++ b/.github/workflows/test-build-stream-sprout.yml @@ -78,6 +78,11 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Get stream-sprout version 🔢 + id: get_version + run: | + STREAM_SPROUT_VER=$(grep "^readonly VERSION" stream-sprout | cut -d'"' -f2) + echo "STREAM_SPROUT_VER=$STREAM_SPROUT_VER" >> $GITHUB_ENV - name: "Build Container 🐋" uses: docker/build-push-action@v6 with: @@ -86,7 +91,7 @@ jobs: push: false tags: | ghcr.io/${{ github.repository }}:latest-alpine - ghcr.io/${{ github.repository }}:${{ github.ref_name }}-alpine + ghcr.io/${{ github.repository }}:${{ env.STREAM_SPROUT_VER }}-alpine ghcr.io/${{ github.repository }}:${{ github.sha }}-alpine platforms: linux/amd64, linux/arm64 - name: Logout from Container Registry