1+ env :
2+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3+
4+ jobs :
5+ main :
6+ name : CI
7+ runs-on : ubuntu-latest
8+ steps :
9+ - name : Install Go if version file not specified
10+ if : ${{ inputs.go-version-file == '' }}
11+ uses : actions/setup-go@v3
12+ with :
13+ go-version : ${{ inputs.go-version }}
14+ - name : Install pulumictl
15+ uses : jaxxstorm/action-install-gh-release@v1.10.0
16+ with :
17+ repo : pulumi/pulumictl
18+ - name : Install Pulumi CLI
19+ uses : pulumi/actions@v4
20+ - name : Checkout repo
21+ uses : actions/checkout@v3
22+ with :
23+ ref : ${{ github.ref_name }}
24+ - name : Install Go using version file if specified
25+ if : ${{ inputs.go-version-file != '' }}
26+ uses : actions/setup-go@v3
27+ with :
28+ go-version-file : ${{ inputs.go-version-file }}
29+ - name : Unshallow clone for tags
30+ run : git fetch --prune --unshallow --tags
31+ shell : bash
32+ - name : Install upgrade-provider
33+ run : go install github.com/pulumi/upgrade-provider@main
34+ shell : bash
35+ - name : Setup Gradle
36+ # Taken from ci-mgmt: https://github.com/pulumi/ci-mgmt/blob/cbb506c8323134f33314a4877d8cd305b127d6da/provider-ci/internal/pkg/action-versions.yml#L34
37+ uses : gradle/gradle-build-action@ac2d340dc04d9e1113182899e983b5400c17cda1 # v3.5.0
38+ with :
39+ gradle-version : " 7.6"
40+ # workaround
41+ - name : Configure Git for Private Modules
42+ run : |
43+ git config --global url."https://oauth2:${GITHUB_TOKEN}@github.com".insteadOf "https://github.com"
44+ # workaround end
45+ - name : Run upgrade-provider
46+ run : |
47+ set -x
48+ upgrade-provider "$REPO" --kind="$KIND" ${TBV:+--target-bridge-version="$TBV"} ${REV:+--pr-reviewers="$REV"} ${DESC:+--pr-description="$DESC"} ${PREF:+--pr-title-prefix="$PREF"} ${PUV:+--target-pulumi-version="$PUV"} ${JV:+--java-version="$JV"} ${TPV:+--target-version="$TPV"} ${AM:+--allow-missing-docs="$AM"}
49+ shell : bash
50+ env :
51+ GH_TOKEN : ${{ env.GH_TOKEN }}
52+ REPO : ${{ github.repository }}
53+ KIND : ${{ inputs.kind }}
54+ TBV : ${{ inputs.target-bridge-version }}
55+ REV : ${{ inputs.pr-reviewers }}
56+ DESC : ${{ inputs.pr-description }}
57+ PREF : ${{ inputs.pr-title-prefix }}
58+ PUV : ${{ inputs.target-pulumi-version }}
59+ JV : ${{ inputs.target-java-version }}
60+ TPV : ${{ inputs.target-version }}
61+ AM : ${{ inputs.allow-missing-docs }}
62+ - name : Patch release
63+ if : ${{ inputs.patch-release == 'true' }}
64+ run : gh pr edit --add-label needs-release/patch
65+ shell : bash
66+ env :
67+ GH_TOKEN : ${{ env.GH_TOKEN }}
68+
69+ name : Upgrade provider Test
70+
71+ permissions :
72+ contents : write
73+ pull-requests : write
74+
75+ on :
76+ issues :
77+ types :
78+ - opened
79+ workflow_dispatch : {}
0 commit comments