Skip to content

Commit 990703a

Browse files
authored
[internal] Update GitHub Actions workflow files (#150)
1 parent b012e52 commit 990703a

20 files changed

+54
-71
lines changed

.github/actions/download-bin/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ runs:
55
using: "composite"
66
steps:
77
- name: Download provider + tfgen binaries
8-
uses: actions/download-artifact@v4
8+
uses: actions/download-artifact@v4.1.8
99
with:
1010
name: xyz-provider.tar.gz
1111
path: ${{ github.workspace }}/bin

.github/actions/download-sdk/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ runs:
1010
using: "composite"
1111
steps:
1212
- name: Download ${{ inputs.language }} SDK
13-
uses: actions/download-artifact@v4
13+
uses: actions/download-artifact@v4.1.8
1414
with:
1515
name: ${{ inputs.language }}-sdk.tar.gz
1616
path: ${{ github.workspace}}/sdk/

.github/actions/upload-bin/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ runs:
88
shell: bash
99
run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace }}/bin/ pulumi-resource-xyz pulumi-tfgen-xyz
1010
- name: Upload artifacts
11-
uses: actions/upload-artifact@v4
11+
uses: actions/upload-artifact@v4.4.3
1212
with:
1313
name: xyz-provider.tar.gz
1414
path: ${{ github.workspace }}/bin/provider.tar.gz

.github/actions/upload-sdk/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
shell: bash
1414
run: tar -zcf sdk/${{ inputs.language }}.tar.gz -C sdk/${{ inputs.language }} .
1515
- name: Upload artifacts
16-
uses: actions/upload-artifact@v4
16+
uses: actions/upload-artifact@v4.4.3
1717
with:
1818
name: ${{ inputs.language }}-sdk.tar.gz
1919
path: ${{ github.workspace}}/sdk/${{ inputs.language }}.tar.gz

.github/workflows/build_provider.yml

+4-7
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
arch: amd64
3131
steps:
3232
- name: Checkout Repo
33-
uses: actions/checkout@v4
33+
uses: actions/checkout@v4.2.2
3434
with:
3535
persist-credentials: false
3636
- name: Setup tools
@@ -40,22 +40,19 @@ jobs:
4040
- name: Prepare local workspace before restoring previously built
4141
run: make prepare_local_workspace
4242
- name: Download schema-embed.json
43-
uses: actions/download-artifact@v4
43+
uses: actions/download-artifact@v4.1.8
4444
with:
4545
# Use a pattern to avoid failing if the artifact doesn't exist
4646
pattern: schema-embed.*
4747
# Avoid creating directories for each artifact
4848
merge-multiple: true
4949
path: provider/cmd/pulumi-resource-xyz/schema-embed.json
5050
- name: Restore makefile progress
51-
uses: actions/download-artifact@v4
52-
with:
53-
name: prerequisites.make
54-
path: .make
51+
run: make --touch provider schema
5552
- name: Build & package provider
5653
run: make provider_dist-${{ matrix.platform.os }}-${{ matrix.platform.arch }}
5754
- name: Upload artifacts
58-
uses: actions/upload-artifact@v4
55+
uses: actions/upload-artifact@v4.4.3
5956
with:
6057
name: pulumi-resource-xyz-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz
6158
path: bin/pulumi-resource-xyz-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz

.github/workflows/build_sdk.yml

+2-11
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- python
4141
steps:
4242
- name: Checkout Repo
43-
uses: actions/checkout@v4
43+
uses: actions/checkout@v4.2.2
4444
with:
4545
persist-credentials: false
4646
- name: Cache examples generation
@@ -60,10 +60,7 @@ jobs:
6060
- name: Update path
6161
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
6262
- name: Restore makefile progress
63-
uses: actions/download-artifact@v4
64-
with:
65-
name: prerequisites.make
66-
path: .make
63+
run: make --touch provider schema
6764
- name: Build SDK
6865
run: make build_${{ matrix.language }}
6966
- name: Check worktree clean
@@ -79,9 +76,3 @@ jobs:
7976
uses: ./.github/actions/upload-sdk
8077
with:
8178
language: ${{ matrix.language }}
82-
- name: Save makefile progress
83-
uses: actions/upload-artifact@v4
84-
with:
85-
name: build_${{ matrix.language }}.make
86-
path: .make
87-
include-hidden-files: true

.github/workflows/license.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
runs-on: ubuntu-latest
3131
steps:
3232
- name: Checkout Repo
33-
uses: actions/checkout@v4
33+
uses: actions/checkout@v4.2.2
3434
with:
3535
persist-credentials: false
3636
- name: Setup tools

.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
runs-on: ubuntu-latest
3131
steps:
3232
- name: Checkout Repo
33-
uses: actions/checkout@v4
33+
uses: actions/checkout@v4.2.2
3434
with:
3535
persist-credentials: false
3636
- name: Install go

.github/workflows/main.yml

+4-7
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ jobs:
5555
tool-cache: false
5656
swap-storage: false
5757
- name: Checkout Repo
58-
uses: actions/checkout@v4
58+
uses: actions/checkout@v4.2.2
5959
with:
6060
persist-credentials: false
6161
- name: Configure AWS Credentials
62-
uses: aws-actions/configure-aws-credentials@v4
62+
uses: aws-actions/configure-aws-credentials@v4.0.2
6363
with:
6464
aws-access-key-id: ${{ secrets.AWS_CORP_S3_UPLOAD_ACCESS_KEY_ID }}
6565
aws-region: us-west-2
@@ -137,7 +137,7 @@ jobs:
137137
PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }}
138138
steps:
139139
- name: Checkout Repo
140-
uses: actions/checkout@v4
140+
uses: actions/checkout@v4.2.2
141141
with:
142142
persist-credentials: false
143143
- name: Setup tools
@@ -153,10 +153,7 @@ jobs:
153153
with:
154154
language: ${{ matrix.language }}
155155
- name: Restore makefile progress
156-
uses: actions/download-artifact@v4
157-
with:
158-
name: build_${{ matrix.language }}.make
159-
path: .make
156+
run: make --touch provider schema build_${{ matrix.language }}
160157
- name: Update path
161158
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
162159
- name: Install Python deps

.github/workflows/prerelease.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }}
8080
steps:
8181
- name: Checkout Repo
82-
uses: actions/checkout@v4
82+
uses: actions/checkout@v4.2.2
8383
with:
8484
persist-credentials: false
8585
- name: Setup tools
@@ -95,10 +95,7 @@ jobs:
9595
with:
9696
language: ${{ matrix.language }}
9797
- name: Restore makefile progress
98-
uses: actions/download-artifact@v4
99-
with:
100-
name: build_${{ matrix.language }}.make
101-
path: .make
98+
run: make --touch provider schema build_${{ matrix.language }}
10299
- name: Update path
103100
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
104101
- name: Install Python deps

.github/workflows/prerequisites.yml

+3-9
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
version: ${{ steps.provider-version.outputs.version }}
4444
steps:
4545
- name: Checkout Repo
46-
uses: actions/checkout@v4
46+
uses: actions/checkout@v4.2.2
4747
with:
4848
persist-credentials: false
4949
- uses: pulumi/provider-version-action@v1
@@ -77,15 +77,9 @@ jobs:
7777
schema-tools compare -r github://api.github.com/pulumi -p xyz -o "${{ inputs.default_branch }}" -n --local-path=provider/cmd/pulumi-resource-xyz/schema.json;
7878
echo "$EOF";
7979
} >> "$GITHUB_ENV"
80-
- name: Save makefile progress
81-
uses: actions/upload-artifact@v4
82-
with:
83-
name: prerequisites.make
84-
path: .make
85-
include-hidden-files: true
8680
- if: inputs.is_pr && inputs.is_automated == false
8781
name: Comment on PR with Details of Schema Check
88-
uses: thollander/actions-comment-pull-request@v2
82+
uses: thollander/actions-comment-pull-request@v2.5.0
8983
with:
9084
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9185
comment_tag: schemaCheck
@@ -99,7 +93,7 @@ jobs:
9993
uses: ./.github/actions/upload-bin
10094

10195
- name: Upload schema-embed.json
102-
uses: actions/upload-artifact@v4
96+
uses: actions/upload-artifact@v4.4.3
10397
with:
10498
name: schema-embed.json
10599
path: provider/cmd/pulumi-resource-xyz/schema-embed.json

.github/workflows/publish.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
if: inputs.skipGoSdk && inputs.isPrerelease == false
4747
run: echo "Can't skip Go SDK for stable releases. This is likely a bug in the calling workflow." && exit 1
4848
- name: Checkout Repo
49-
uses: actions/checkout@v4
49+
uses: actions/checkout@v4.2.2
5050
with:
5151
persist-credentials: false
5252
- name: Setup tools
@@ -56,7 +56,7 @@ jobs:
5656
- name: Create dist directory
5757
run: mkdir -p dist
5858
- name: Download provider assets
59-
uses: actions/download-artifact@v4
59+
uses: actions/download-artifact@v4.1.8
6060
with:
6161
pattern: pulumi-resource-xyz-v${{ inputs.version }}-*
6262
path: dist
@@ -98,7 +98,7 @@ jobs:
9898
runs-on: ubuntu-latest
9999
steps:
100100
- name: Checkout Repo
101-
uses: actions/checkout@v4
101+
uses: actions/checkout@v4.2.2
102102
with:
103103
# Persist credentials so we can push back to the repo
104104
persist-credentials: true
@@ -139,7 +139,7 @@ jobs:
139139
runs-on: ubuntu-latest
140140
steps:
141141
- name: Checkout Repo
142-
uses: actions/checkout@v4
142+
uses: actions/checkout@v4.2.2
143143
with:
144144
persist-credentials: false
145145
- name: Clean up release labels

.github/workflows/pull-request.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Checkout Repo
27-
uses: actions/checkout@v4
27+
uses: actions/checkout@v4.2.2
2828
with:
2929
persist-credentials: false
3030
- name: Comment PR
31-
uses: thollander/actions-comment-pull-request@v2
31+
uses: thollander/actions-comment-pull-request@v2.5.0
3232
with:
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3434
message: >

.github/workflows/release.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }}
8686
steps:
8787
- name: Checkout Repo
88-
uses: actions/checkout@v4
88+
uses: actions/checkout@v4.2.2
8989
with:
9090
persist-credentials: false
9191
- name: Setup tools
@@ -101,10 +101,7 @@ jobs:
101101
with:
102102
language: ${{ matrix.language }}
103103
- name: Restore makefile progress
104-
uses: actions/download-artifact@v4
105-
with:
106-
name: build_${{ matrix.language }}.make
107-
path: .make
104+
run: make --touch provider schema build_${{ matrix.language }}
108105
- name: Update path
109106
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
110107
- name: Install Python deps

.github/workflows/resync-build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Checkout Repo
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@v4.2.2
2929
with:
3030
# Persist credentials so we can push a new branch.
3131
persist-credentials: true
3232
- name: Checkout repo
33-
uses: actions/checkout@v4
33+
uses: actions/checkout@v4.2.2
3434
with:
3535
path: ci-mgmt
3636
repository: pulumi/ci-mgmt

.github/workflows/run-acceptance-tests.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ jobs:
127127
PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }}
128128
steps:
129129
- name: Checkout Repo
130-
uses: actions/checkout@v4
130+
uses: actions/checkout@v4.2.2
131131
with:
132132
ref: ${{ env.PR_COMMIT_SHA }}
133133
persist-credentials: false
134134
- name: Checkout p/examples
135135
if: matrix.testTarget == 'pulumiExamples'
136-
uses: actions/checkout@v4
136+
uses: actions/checkout@v4.2.2
137137
with:
138138
repository: pulumi/examples
139139
path: p-examples
@@ -150,10 +150,7 @@ jobs:
150150
with:
151151
language: ${{ matrix.language }}
152152
- name: Restore makefile progress
153-
uses: actions/download-artifact@v4
154-
with:
155-
name: build_${{ matrix.language }}.make
156-
path: .make
153+
run: make --touch provider schema build_${{ matrix.language }}
157154
- name: Update path
158155
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
159156
- name: Install Python deps

.github/workflows/upgrade-bridge.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,23 @@ on:
4949
required: false
5050
type: boolean
5151
default: false
52+
53+
permissions:
54+
contents: write
55+
issues: write
56+
pull-requests: write
57+
5258
env:
53-
GH_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
59+
GH_TOKEN: ${{ secrets.PULUMI_PROVIDER_AUTOMATION_TOKEN || secrets.PULUMI_BOT_TOKEN || secrets.GITHUB_TOKEN }}
5460
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
5562
jobs:
5663
upgrade_provider:
5764
name: upgrade-provider
5865
runs-on: ubuntu-latest
5966
steps:
6067
- name: Checkout Repo
61-
uses: actions/checkout@v4
68+
uses: actions/checkout@v4.2.2
6269
with:
6370
persist-credentials: false
6471
- name: Setup tools

.github/workflows/upgrade-provider.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,22 @@ on:
2222
# 3 AM UTC ~ 8 PM PDT / 7 PM PST daily. Time chosen to run during off hours.
2323
- cron: 0 3 * * *
2424

25+
permissions:
26+
contents: write
27+
issues: write
28+
pull-requests: write
29+
2530
env:
26-
GH_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
31+
GH_TOKEN: ${{ secrets.PULUMI_PROVIDER_AUTOMATION_TOKEN || secrets.PULUMI_BOT_TOKEN || secrets.GITHUB_TOKEN }}
2732
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
2834
jobs:
2935
upgrade_provider:
3036
name: upgrade-provider
3137
runs-on: ubuntu-latest
3238
steps:
3339
- name: Checkout Repo
34-
uses: actions/checkout@v4
40+
uses: actions/checkout@v4.2.2
3541
with:
3642
# Persist credentials so upgrade-provider can push a new branch.
3743
persist-credentials: true

.github/workflows/verify-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
runs-on: ${{ matrix.runner }}
7070
steps:
7171
- name: Checkout Repo
72-
uses: actions/checkout@v4
72+
uses: actions/checkout@v4.2.2
7373
with:
7474
persist-credentials: false
7575
- name: Setup tools

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,12 @@ tfgen_no_deps: .make/schema
240240
.make/schema: export PULUMI_CONVERT_EXAMPLES_CACHE_DIR := $(WORKING_DIR)/.pulumi/examples-cache
241241
.make/schema: export PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION := $(PULUMI_CONVERT)
242242
.make/schema: export PULUMI_MISSING_DOCS_ERROR := $(PULUMI_MISSING_DOCS_ERROR)
243-
.make/schema: bin/$(TFGEN) provider/resources.go provider/go.mod .make/install_plugins .make/upstream
243+
.make/schema: bin/$(TFGEN) .make/install_plugins .make/upstream
244244
$(WORKING_DIR)/bin/$(TFGEN) schema --out provider/cmd/$(PROVIDER)
245245
(cd provider && VERSION=$(VERSION_GENERIC) go generate cmd/$(PROVIDER)/main.go)
246246
@touch $@
247247
tfgen_build_only: bin/$(TFGEN)
248-
bin/$(TFGEN):
248+
bin/$(TFGEN): provider/*.go provider/go.* .make/upstream
249249
(cd provider && go build $(PULUMI_PROVIDER_BUILD_PARALLELISM) -o $(WORKING_DIR)/bin/$(TFGEN) -ldflags "$(LDFLAGS_PROJ_VERSION) $(LDFLAGS_EXTRAS)" $(PROJECT)/$(PROVIDER_PATH)/cmd/$(TFGEN))
250250
.PHONY: tfgen schema tfgen_no_deps tfgen_build_only
251251

0 commit comments

Comments
 (0)