Skip to content

Commit 04ecab9

Browse files
committed
Managed by Terraform: Update notify-integration-release-via-tag github workflow
1 parent 1f831fc commit 04ecab9

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/notify-integration-release-via-tag.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,21 @@ on:
33
push:
44
tags:
55
- '*.*.*' # Proper releases
6-
- '*.*.*-*' # Pre releases
76
jobs:
7+
strip-version:
8+
runs-on: ubuntu-latest
9+
outputs:
10+
packer-version: ${{ steps.strip.outputs.packer-version }}
11+
steps:
12+
- name: Strip leading v from version tag
13+
id: strip
14+
env:
15+
REF: ${{ github.ref_name }}
16+
run: |
17+
echo "packer-version=$(echo "$REF" | sed -E 's/v?([0-9]+\.[0-9]+\.[0-9]+)/\1/')" >> "$GITHUB_OUTPUT"
818
notify-release:
19+
needs:
20+
- strip-version
921
runs-on: ubuntu-latest
1022
steps:
1123
- name: Checkout this repo
@@ -34,7 +46,7 @@ jobs:
3446
- name: Notify Release
3547
uses: ./integration-release-action
3648
with:
37-
integration_identifier: 'packer/hashicorp/tencentcloud'
38-
release_version: ${{ github.ref_name }}
49+
integration_identifier: "packer/hashicorp/tencentcloud"
50+
release_version: ${{ needs.strip-version.outputs.packer-version }}
3951
release_sha: ${{ github.ref }}
4052
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)