Skip to content

Commit 83fd577

Browse files
authored
[internal] Update GitHub Actions workflow files (#135)
1 parent 6702e99 commit 83fd577

File tree

2 files changed

+125
-1
lines changed

2 files changed

+125
-1
lines changed

.github/workflows/update-bridge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
}}
5656
committer: pulumi-bot <bot@pulumi.com>
5757
labels: impact/no-changelog-required
58-
reviewers: pulumi/platform-integrations
58+
team-reviewers: platform-integrations
5959
title: Update pulumi-terraform-bridge to v${{ github.event.inputs.bridge_version
6060
}}
6161
token: ${{ secrets.PULUMI_BOT_TOKEN }}
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
env:
2+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5+
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
6+
PROVIDER: postgresql
7+
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
8+
PULUMI_API: https://api.pulumi-staging.io
9+
PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/..
10+
PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget
11+
PULUMI_PROVIDER_MAP_ERROR: true
12+
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
13+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
14+
TRAVIS_OS_NAME: linux
15+
UPSTREAM_PROVIDER_ORG: pulumi
16+
UPSTREAM_PROVIDER_REPO: terraform-provider-postgresql
17+
jobs:
18+
update_upstream_provider:
19+
name: update-upstream_provider
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout Repo
23+
uses: actions/checkout@v2
24+
- name: Unshallow clone for tags
25+
run: git fetch --prune --unshallow --tags
26+
- name: Install Go
27+
uses: actions/setup-go@v2
28+
with:
29+
go-version: ${{matrix.goversion}}
30+
- name: Install pulumictl
31+
uses: jaxxstorm/action-install-gh-release@v1.2.0
32+
with:
33+
repo: pulumi/pulumictl
34+
- name: Install Pulumi CLI
35+
uses: pulumi/action-install-pulumi-cli@v2
36+
- name: Setup DotNet
37+
uses: actions/setup-dotnet@v1
38+
with:
39+
dotnet-version: ${{matrix.dotnetversion}}
40+
- name: Setup Node
41+
uses: actions/setup-node@v2
42+
with:
43+
node-version: ${{matrix.nodeversion}}
44+
registry-url: https://registry.npmjs.org
45+
- name: Setup Python
46+
uses: actions/setup-python@v2
47+
with:
48+
python-version: ${{matrix.pythonversion}}
49+
- name: Get upstream provider sha
50+
run: echo "UPSTREAM_PROVIDER_SHA=$(curl https://api.github.com/repos/${{ env.UPSTREAM_PROVIDER_ORG
51+
}}/${{ env.UPSTREAM_PROVIDER_REPO }}/git/ref/tags/v${{ github.event.inputs.version
52+
}} | jq .object.sha -r)" >> $GITHUB_ENV
53+
- if: ${{ hashFiles('provider/shim/go.mod') != '' }}
54+
name: Update shim/go.mod
55+
run: cd provider/shim && go mod edit -require github.com/${{ env.UPSTREAM_PROVIDER_ORG
56+
}}/${{ env.UPSTREAM_PROVIDER_REPO }}@${{ env.UPSTREAM_PROVIDER_SHA }} && go
57+
mod tidy
58+
- name: Update go.mod
59+
run: cd provider && go mod edit -require github.com/${{ env.UPSTREAM_PROVIDER_ORG
60+
}}/${{ env.UPSTREAM_PROVIDER_REPO }}@${{ env.UPSTREAM_PROVIDER_SHA }} && go
61+
mod tidy
62+
- run: make tfgen
63+
- run: make build_sdks
64+
- if: ${{ !github.event.inputs.linked_issue_number }}
65+
name: Create PR (no linked issue)
66+
uses: peter-evans/create-pull-request@v3.12.0
67+
with:
68+
author: pulumi-bot <bot@pulumi.com>
69+
base: master
70+
body: This pull request was generated automatically by the update-upstream-provider
71+
workflow in this repository.
72+
branch: pulumi-bot/v${{ github.event.inputs.version }}-${{ github.run_id}}
73+
commit-message: Update ${{ env.UPSTREAM_PROVIDER_REPO }} to v${{ github.event.inputs.version
74+
}}
75+
committer: pulumi-bot <bot@pulumi.com>
76+
labels: impact/no-changelog-required
77+
team-reviewers: platform-integrations
78+
title: Update ${{ env.UPSTREAM_PROVIDER_REPO }} to v${{ github.event.inputs.version
79+
}}
80+
token: ${{ secrets.PULUMI_BOT_TOKEN }}
81+
- if: ${{ github.event.inputs.linked_issue_number }}
82+
name: Create PR (with linked issue)
83+
uses: peter-evans/create-pull-request@v3.12.0
84+
with:
85+
author: pulumi-bot <bot@pulumi.com>
86+
base: master
87+
body: |-
88+
Fixes #${{ github.event.inputs.linked_issue_number }}
89+
90+
This pull request was generated automatically by the update-upstream-provider workflow in this repository.
91+
branch: pulumi-bot/v${{ github.event.inputs.version }}-${{ github.run_id}}
92+
commit-message: Update ${{ env.UPSTREAM_PROVIDER_REPO }} to v${{ github.event.inputs.version
93+
}}
94+
committer: pulumi-bot <bot@pulumi.com>
95+
labels: impact/no-changelog-required
96+
team-reviewers: platform-integrations
97+
title: Update ${{ env.UPSTREAM_PROVIDER_REPO }} to v${{ github.event.inputs.version
98+
}}
99+
token: ${{ secrets.PULUMI_BOT_TOKEN }}
100+
strategy:
101+
fail-fast: true
102+
matrix:
103+
dotnetversion:
104+
- 3.1.301
105+
goversion:
106+
- 1.17.x
107+
nodeversion:
108+
- 14.x
109+
pythonversion:
110+
- "3.7"
111+
name: Update upstream provider
112+
"on":
113+
workflow_dispatch:
114+
inputs:
115+
linked_issue_number:
116+
description: The issue number of a PR in this repository to which the generated
117+
pull request should be linked.
118+
required: false
119+
type: string
120+
version:
121+
description: The new version of the upstream provider. Do not include the
122+
'v' prefix.
123+
required: true
124+
type: string

0 commit comments

Comments
 (0)