Skip to content

Commit bff892a

Browse files
authored
Update GitHub Actions workflows. (#4920)
This PR was automatically generated by the update-workflows-single-bridged-provider workflow in the pulumi/ci-mgmt repo, from commit 3e4be1caba9e051f1cbc2ecfdca169360313e9dd.
1 parent 8b5a96f commit bff892a

22 files changed

+244
-556
lines changed

.github/actions/setup-tools/action.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,31 @@ inputs:
1414
dotnet
1515
java
1616
default: all
17+
cache-go:
18+
description: |
19+
Whether to enable the GitHub cache for Go. Appropriate for disabling in
20+
smaller jobs that typically completely before the "real" job has an
21+
opportunity to populate the cache.
22+
default: "true"
1723

1824
runs:
1925
using: "composite"
2026
steps:
2127
- name: Install Go
2228
if: inputs.tools == 'all' || contains(inputs.tools, 'go')
23-
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5
29+
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5
2430
with:
2531
go-version: "1.23.x"
2632
cache-dependency-path: |
2733
provider/*.sum
2834
upstream/*.sum
2935
sdk/*.sum
36+
# TODO(https://github.com/actions/setup-go/issues/316): Restore but don't save the cache.
37+
cache: ${{ inputs.cache-go }}
3038

3139
- name: Install pulumictl
3240
if: inputs.tools == 'all' || contains(inputs.tools, 'pulumictl')
33-
uses: jaxxstorm/action-install-gh-release@71d17cb091aa850acb2a1a4cf87258d183eb941b # v1.11.0
41+
uses: jaxxstorm/action-install-gh-release@cd6b2b78ad38bdd294341cda064ec0692b06215b # v1.14.0
3442
with:
3543
tag: v0.0.46
3644
repo: pulumi/pulumictl
@@ -43,7 +51,7 @@ runs:
4351

4452
- name: Install Schema Tools
4553
if: inputs.tools == 'all' || contains(inputs.tools, 'schema-tools')
46-
uses: jaxxstorm/action-install-gh-release@71d17cb091aa850acb2a1a4cf87258d183eb941b # v1.11.0
54+
uses: jaxxstorm/action-install-gh-release@cd6b2b78ad38bdd294341cda064ec0692b06215b # v1.14.0
4755
with:
4856
repo: pulumi/schema-tools
4957

.github/workflows/build_provider.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
env:
1616
PROVIDER_VERSION: ${{ inputs.version }}
1717
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
AZURE_SIGNING_CONFIGURED: ${{ secrets.AZURE_SIGNING_CLIENT_ID != '' && secrets.AZURE_SIGNING_CLIENT_SECRET != '' && secrets.AZURE_SIGNING_TENANT_ID != '' && secrets.AZURE_SIGNING_KEY_VAULT_URI != '' }}
1819
strategy:
1920
fail-fast: true
2021
matrix:
@@ -37,6 +38,7 @@ jobs:
3738
tool-cache: false
3839
swap-storage: false
3940
dotnet: false
41+
large-packages: false
4042
- name: Checkout Repo
4143
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4244
with:
@@ -58,8 +60,31 @@ jobs:
5860
path: provider/cmd/pulumi-resource-aws
5961
- name: Restore makefile progress
6062
run: make --touch provider schema
61-
- name: Build & package provider
63+
64+
- name: Build provider
65+
run: make "provider-${{ matrix.platform.os }}-${{ matrix.platform.arch }}"
66+
67+
- name: Sign windows provider
68+
if: matrix.platform.os == 'windows' && env.AZURE_SIGNING_CONFIGURED == 'true'
69+
run: |
70+
az login --service-principal \
71+
-u ${{ secrets.AZURE_SIGNING_CLIENT_ID }} \
72+
-p ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }} \
73+
-t ${{ secrets.AZURE_SIGNING_TENANT_ID }} \
74+
-o none;
75+
76+
wget https://github.com/ebourg/jsign/releases/download/6.0/jsign-6.0.jar;
77+
78+
java -jar jsign-6.0.jar \
79+
--storetype AZUREKEYVAULT \
80+
--keystore "PulumiCodeSigning" \
81+
--url ${{ secrets.AZURE_SIGNING_KEY_VAULT_URI }} \
82+
--storepass "$(az account get-access-token --resource "https://vault.azure.net" | jq -r .accessToken)" \
83+
bin/windows-amd64/pulumi-resource-aws.exe;
84+
85+
- name: Package provider
6286
run: make provider_dist-${{ matrix.platform.os }}-${{ matrix.platform.arch }}
87+
6388
- name: Upload artifacts
6489
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
6590
with:

.github/workflows/build_sdk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
submodules: true
5757
persist-credentials: false
5858
- name: Cache examples generation
59-
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
59+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
6060
with:
6161
path: |
6262
.pulumi/examples-cache

.github/workflows/community-moderation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- if: steps.sdk_changed.outputs.changed == 'true' &&
2727
github.event.pull_request.head.repo.full_name != github.repository
2828
name: Send codegen warning as comment on PR
29-
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0
29+
uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1
3030
with:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3232
message: >

.github/workflows/license.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
uses: ./.github/actions/setup-tools
4141
with:
4242
tools: go
43+
cache-go: false
4344
- run: make upstream
4445
- uses: pulumi/license-check-action@main
4546
with:

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
submodules: true
3939
persist-credentials: false
4040
- name: Install go
41-
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5
41+
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5
4242
with:
4343
# The versions of golangci-lint and setup-go here cross-depend and need to update together.
4444
go-version: 1.23

.github/workflows/master.yml

Lines changed: 4 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ jobs:
9999
- build_provider
100100
- test
101101
- license_check
102-
- upstream_lint
103102
uses: ./.github/workflows/publish.yml
104103
secrets: inherit
105104
with:
@@ -127,106 +126,14 @@ jobs:
127126
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
128127

129128
test:
130-
name: test
129+
uses: ./.github/workflows/test.yml
131130
needs:
132131
- prerequisites
133132
- build_provider
134133
- build_sdk
135-
permissions:
136-
contents: read
137-
id-token: write
138-
runs-on: ubuntu-latest
139-
env:
140-
PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }}
141-
steps:
142-
# Run as first step so we don't delete things that have just been installed
143-
- name: Free Disk Space (Ubuntu)
144-
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
145-
with:
146-
tool-cache: false
147-
swap-storage: false
148-
dotnet: false
149-
- name: Checkout Repo
150-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
151-
with:
152-
submodules: true
153-
persist-credentials: false
154-
- name: Setup tools
155-
uses: ./.github/actions/setup-tools
156-
with:
157-
tools: pulumictl, pulumicli, ${{ matrix.language }}
158-
- name: Prepare local workspace
159-
run: make prepare_local_workspace
160-
- name: Download bin
161-
uses: ./.github/actions/download-bin
162-
- name: Download SDK
163-
uses: ./.github/actions/download-sdk
164-
with:
165-
language: ${{ matrix.language }}
166-
- name: Restore makefile progress
167-
run: make --touch provider schema build_${{ matrix.language }}
168-
- name: Update path
169-
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
170-
- name: Install Python deps
171-
if: matrix.language == 'python'
172-
run: |-
173-
pip3 install virtualenv==20.0.23
174-
pip3 install pipenv
175-
- name: Install dependencies
176-
run: make install_${{ matrix.language}}_sdk
177-
- name: Install gotestfmt
178-
uses: GoTestTools/gotestfmt-action@v2
179-
with:
180-
token: ${{ secrets.GITHUB_TOKEN }}
181-
version: v2.5.0
182-
- name: Configure AWS Credentials
183-
uses: aws-actions/configure-aws-credentials@v4
184-
with:
185-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
186-
aws-region: ${{ env.AWS_REGION }}
187-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
188-
role-duration-seconds: 7200
189-
role-session-name: aws@githubActions
190-
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
191-
- name: Make upstream
192-
run: make upstream
193-
- name: Run tests
194-
run: cd examples && go test -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4
195-
strategy:
196-
fail-fast: false
197-
matrix:
198-
language:
199-
- nodejs
200-
- python
201-
- dotnet
202-
- go
203-
- java
204-
upstream_lint:
205-
name: Run upstream provider-lint
206-
runs-on: ubuntu-latest
207-
steps:
208-
- name: Free Disk Space (Ubuntu)
209-
uses: jlumbroso/free-disk-space@main
210-
with:
211-
swap-storage: false
212-
tool-cache: false
213-
- name: Checkout Repo
214-
uses: actions/checkout@v4
215-
with:
216-
ref: ${{ env.PR_COMMIT_SHA }}
217-
submodules: true
218-
- name: Install Go
219-
uses: actions/setup-go@v5
220-
with:
221-
cache: false
222-
go-version: 1.23.x
223-
- name: Prepare local workspace
224-
run: make prepare_local_workspace
225-
- name: upstream lint
226-
run: |
227-
cd upstream
228-
make provider-lint
229-
timeout-minutes: 60
134+
secrets: inherit
135+
with:
136+
version: ${{ needs.prerequisites.outputs.version }}
230137

231138
name: master
232139
on:

.github/workflows/nightly-test.yml

Lines changed: 5 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -45,80 +45,15 @@ jobs:
4545
version: ${{ needs.prerequisites.outputs.version }}
4646

4747
test:
48-
name: test
48+
uses: ./.github/workflows/test.yml
4949
needs:
5050
- prerequisites
5151
- build_provider
5252
- build_sdk
53-
permissions:
54-
contents: read
55-
id-token: write
56-
runs-on: ubuntu-latest
57-
env:
58-
PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }}
59-
steps:
60-
# Run as first step so we don't delete things that have just been installed
61-
- name: Free Disk Space (Ubuntu)
62-
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
63-
with:
64-
tool-cache: false
65-
swap-storage: false
66-
dotnet: false
67-
- name: Checkout Repo
68-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
69-
with:
70-
submodules: true
71-
persist-credentials: false
72-
- name: Setup tools
73-
uses: ./.github/actions/setup-tools
74-
with:
75-
tools: pulumictl, pulumicli, ${{ matrix.language}}
76-
- name: Prepare local workspace
77-
run: make prepare_local_workspace
78-
- name: Download bin
79-
uses: ./.github/actions/download-bin
80-
- name: Download SDK
81-
uses: ./.github/actions/download-sdk
82-
with:
83-
language: ${{ matrix.language }}
84-
- name: Restore makefile progress
85-
run: make --touch provider schema build_${{ matrix.language }}
86-
- name: Update path
87-
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
88-
- name: Install Python deps
89-
if: matrix.language == 'python'
90-
run: |-
91-
pip3 install virtualenv==20.0.23
92-
pip3 install pipenv
93-
- name: Install dependencies
94-
run: make install_${{ matrix.language}}_sdk
95-
- name: Install gotestfmt
96-
uses: GoTestTools/gotestfmt-action@v2
97-
with:
98-
token: ${{ secrets.GITHUB_TOKEN }}
99-
version: v2.5.0
100-
- name: Configure AWS Credentials
101-
uses: aws-actions/configure-aws-credentials@v4
102-
with:
103-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
104-
aws-region: ${{ env.AWS_REGION }}
105-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
106-
role-duration-seconds: 7200
107-
role-session-name: aws@githubActions
108-
role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }}
109-
- name: Make upstream
110-
run: make upstream
111-
- name: Run tests
112-
run: cd examples && go test -count=1 -cover -timeout 2h -tags=${{ matrix.language }} -parallel 4
113-
strategy:
114-
fail-fast: false
115-
matrix:
116-
language:
117-
- nodejs
118-
- python
119-
- dotnet
120-
- go
121-
- java
53+
secrets: inherit
54+
with:
55+
version: ${{ needs.prerequisites.outputs.version }}
56+
12257
name: cron
12358
on:
12459
schedule:

0 commit comments

Comments
 (0)