-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathnotify-integration-release-via-tag.yml
More file actions
63 lines (61 loc) · 2.07 KB
/
notify-integration-release-via-tag.yml
File metadata and controls
63 lines (61 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Notify Integration Release (Tag)
on:
push:
tags:
- 'v*.*.*' # Proper releases
permissions:
contents: read
jobs:
strip-version:
runs-on: ubuntu-latest
permissions:
actions: read
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
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.ref }}
# Ensure that Docs are Compiled
- name: Setup go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: 'go.mod'
- shell: bash
run: make docs
- shell: bash
run: |
if [[ -z "$(git status -s)" ]]; then
echo "OK"
else
echo "Docs have been updated, but the compiled docs have not been committed."
echo "Run 'make docs', and commit the result to resolve this error."
exit 1
fi
# Perform the Release
- name: Checkout integration-release-action
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: hashicorp/integration-release-action
path: ./integration-release-action
- name: Notify Release
uses: ./integration-release-action
with:
# The integration identifier will be used by the Packer team to register the integration
# the expected format is packer/<GitHub Org Name>/<plugin-name>
integration_identifier: "packer/UpCloudLtd/upcloud"
release_version: ${{ needs.strip-version.outputs.packer-version }}
release_sha: ${{ github.ref }}
github_token: ${{ secrets.GITHUB_TOKEN }}