Skip to content

Commit 4c211cb

Browse files
committed
Pulumi enable upgrade pipeline
This CI can be run when there is a new terraform provider version present. Afterwards a PR is created which updates the bridge and the provider. Signed-off-by: Alexander Dahmen <[email protected]>
1 parent d6c8150 commit 4c211cb

File tree

1 file changed

+30
-10
lines changed

1 file changed

+30
-10
lines changed

.github/workflows/upgrade-provider.yaml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,43 @@
1+
name: Upgrade provider
2+
3+
permissions:
4+
contents: write
5+
pull-requests: write
6+
7+
on:
8+
issues:
9+
types:
10+
- opened
11+
workflow_dispatch: {}
12+
113
env:
2-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
GH_TOKEN: ${{ secrets.PR_TOKEN }}
15+
316
jobs:
417
upgrade_provider:
518
if: ${{ (contains(github.event.issue.title, 'Upgrade terraform-provider-')) || github.event_name == 'workflow_dispatch' }}
619
name: upgrade-provider
720
runs-on: ubuntu-latest
821
steps:
22+
# TODO: remove when this repo is made public
23+
- name: Configure Git for Private Modules
24+
run: |
25+
git config --global url."https://oauth2:${{ secrets.PR_TOKEN }}@github.com".insteadOf "https://github.com"
26+
# Sets GOPRIVATE and GONOSUMDB in order to use the git authetnication for go mod.
27+
echo "GOPRIVATE=github.com/${{ github.repository }}/*,github.com/stackitcloud/*" >> $GITHUB_ENV
28+
echo "GONOSUMDB=github.com/${{ github.repository }}/*,github.com/stackitcloud/*" >> $GITHUB_ENV
29+
# TODO: remove end
30+
- name: Install misc
31+
run: |
32+
sudo apt update -y && sudo apt install -y curl
33+
sudo install -dm 755 /etc/apt/keyrings
34+
curl -fSs https://mise.jdx.dev/gpg-key.pub | sudo tee /etc/apt/keyrings/mise-archive-keyring.pub 1> /dev/null
35+
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.pub arch=amd64] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list
36+
sudo apt update
37+
sudo apt install -y mise
938
- name: Call upgrade provider action
1039
uses: pulumi/pulumi-upgrade-provider-action@e247104aede3eb4641f48c8ad0ea9de9346f2457 # v0.0.18
1140
with:
1241
kind: all
13-
name: Upgrade provider
1442

15-
permissions:
16-
contents: write
17-
pull-requests: write
1843

19-
on:
20-
issues:
21-
types:
22-
- opened
23-
workflow_dispatch: {}

0 commit comments

Comments
 (0)