-
Notifications
You must be signed in to change notification settings - Fork 56
64 lines (62 loc) · 2.03 KB
/
weekly-pulumi-update.yml
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
64
name: weekly-pulumi-update
"on":
schedule:
- cron: 35 12 * * 4
workflow_dispatch: {}
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
jobs:
update-go-mod:
name: Update Go mods
runs-on: ubuntu-latest
strategy:
matrix:
goversion: [1.19.x]
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.goversion }}
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
repo: pulumi/pulumictl
- name: Install Pulumi CLI
uses: pulumi/actions@v4
- name: Preparing Git Branch
run: |
git config --local user.email "[email protected]"
git config --local user.name "pulumi-bot"
git checkout -b update-pulumi/${{ github.run_id }}-${{ github.run_number }}
- name: Update pulumi/pulumi
id: gomod
run: |
go get github.com/pulumi/pulumi/sdk/v3
make dep-tidy
git update-index -q --refresh
if ! git diff-files --quiet; then
echo ::set-output name=changes::1
fi
- name: Build codegen + Schema + SDKs
if: steps.gomod.outputs.changes != 0
run: make build
- name: Commit changes
if: steps.gomod.outputs.changes != 0
run: |
git add .
git commit -m "Updated modules"
git push origin update-pulumi/${{ github.run_id }}-${{ github.run_number }}
- name: Open a pull request
if: steps.gomod.outputs.changes != 0
uses: repo-sync/pull-request@v2
with:
source_branch: "update-pulumi/${{ github.run_id }}-${{ github.run_number }}"
destination_branch: "master"
pr_title: "Automated pulumi/pulumi upgrade"
pr_label: "automation/merge"
pr_allow_empty: true
github_token: ${{ secrets.PULUMI_BOT_TOKEN }}