From 4b3439cbbabc25006f52e454562d36d424cb144a Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 13 Oct 2023 14:51:18 -0400 Subject: [PATCH] Managed by Terraform: Update notify-integration-release-via-tag github workflow --- .../notify-integration-release-via-tag.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/notify-integration-release-via-tag.yaml b/.github/workflows/notify-integration-release-via-tag.yaml index 548c1f3b..73d5f83e 100644 --- a/.github/workflows/notify-integration-release-via-tag.yaml +++ b/.github/workflows/notify-integration-release-via-tag.yaml @@ -3,9 +3,21 @@ on: push: tags: - '*.*.*' # Proper releases - - '*.*.*-*' # Pre releases jobs: + strip-version: + runs-on: ubuntu-latest + outputs: + packer-version: ${{ steps.strip.outputs.packer-version }} + steps: + - name: Strip leading v from version tag + id: strip + env: + REF: ${{ github.ref_name }} + run: | + echo "packer-version=$(echo "$REF" | sed -E 's/v?([0-9]+\.[0-9]+\.[0-9]+)/\1/')" >> "$GITHUB_OUTPUT" notify-release: + needs: + - strip-version runs-on: ubuntu-latest steps: - name: Checkout this repo @@ -34,7 +46,7 @@ jobs: - name: Notify Release uses: ./integration-release-action with: - integration_identifier: 'packer/hashicorp/vmware' - release_version: ${{ github.ref_name }} + integration_identifier: "packer/hashicorp/vmware" + release_version: ${{ needs.strip-version.outputs.packer-version }} release_sha: ${{ github.ref }} github_token: ${{ secrets.GITHUB_TOKEN }}