File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1919 rc-release :
2020 runs-on : ubuntu-latest
2121 steps :
22+ - uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 https://github.com/actions/github-script/commits/main
23+ id : check-user-in-maintainers
24+ env :
25+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
26+ with :
27+ script : |
28+ const isMaintainer = ${{ vars.TERRAFORM_MAINTAINERS }}.includes(context.actor);
29+ return isMaintainer;
30+ - run : |
31+ # if the tag doesn't contain "rc" we should not be in this workflow
32+ if grep -q "rc" <<< "${{ inputs.tag }}"; then
33+ echo "Tag contains 'rc', continuing with RC release"
34+ else
35+ echo "Tag doesn't contain 'rc', please use the manual-release workflow"
36+ exit 1
37+ fi
2238 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 https://github.com/actions/checkout
2339 with :
2440 fetch-depth : 0
Original file line number Diff line number Diff line change 1919 release :
2020 runs-on : ubuntu-latest
2121 steps :
22+ - uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 https://github.com/actions/github-script/commits/main
23+ id : check-user-in-maintainers
24+ env :
25+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
26+ with :
27+ script : |
28+ const isMaintainer = ${{ vars.TERRAFORM_MAINTAINERS }}.includes(context.actor);
29+ return isMaintainer;
30+ - run : |
31+ # if the tag contains "rc" we should not be in this workflow
32+ if grep -q "rc" <<< "${{ inputs.tag }}"; then
33+ echo "Tag contains 'rc', please use the manual-rc-release workflow"
34+ exit 1
35+ fi
2236 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 https://github.com/actions/checkout
2337 with :
2438 fetch-depth : 0
4155 with :
4256 ref : ${{ inputs.tag }}
4357 path : ${{ github.workspace }}/tags/${{ inputs.tag }}
58+ - run : |
59+ # remove any tags that are not the one specified (to avoid goreleaser confusion)
60+ cd "${{ github.workspace }}/tags/${{ inputs.tag }}"
61+ git tag | grep -v "${{ inputs.tag }}" | xargs git tag -d
62+ cd ../../
4463 - name : retrieve GPG Credentials
4564 id : retrieve-gpg-credentials
4665 uses : rancher-eio/read-vault-secrets@main
You can’t perform that action at this time.
0 commit comments