Skip to content

Commit 228d6ca

Browse files
committed
[internal] Update GitHub Actions workflow files
1 parent fb9bcd0 commit 228d6ca

9 files changed

+250
-120
lines changed

.github/workflows/build_provider.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ jobs:
3737
uses: ./.github/actions/setup-tools
3838
with:
3939
tools: pulumictl, go
40+
- name: Prepare local workspace before restoring previously built
41+
run: make prepare_local_workspace
4042
- name: Download schema-embed.json
4143
uses: actions/download-artifact@v4
4244
with:
@@ -45,9 +47,11 @@ jobs:
4547
# Avoid creating directories for each artifact
4648
merge-multiple: true
4749
path: provider/cmd/pulumi-resource-keycloak/schema-embed.json
48-
- name: Prepare for build
49-
# This installs plugins and prepares upstream
50-
run: make upstream
50+
- name: Restore makefile progress
51+
uses: actions/download-artifact@v4
52+
with:
53+
name: prerequisites.make
54+
path: .make
5155
- name: Build & package provider
5256
run: make provider_dist-${{ matrix.platform.os }}-${{ matrix.platform.arch }}
5357
- name: Upload artifacts

.github/workflows/build_sdk.yml

+13-2
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,17 @@ jobs:
5959
uses: ./.github/actions/setup-tools
6060
with:
6161
tools: pulumictl, pulumicli, ${{ matrix.language }}
62+
- name: Prepare local workspace
63+
run: make prepare_local_workspace
6264
- name: Download bin
6365
uses: ./.github/actions/download-bin
64-
- name: Install plugins
65-
run: make install_plugins
6666
- name: Update path
6767
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
68+
- name: Restore makefile progress
69+
uses: actions/download-artifact@v4
70+
with:
71+
name: prerequisites.make
72+
path: .make
6873
- name: Build SDK
6974
run: make build_${{ matrix.language }}
7075
- name: Check worktree clean
@@ -80,3 +85,9 @@ jobs:
8085
uses: ./.github/actions/upload-sdk
8186
with:
8287
language: ${{ matrix.language }}
88+
- name: Save makefile progress
89+
uses: actions/upload-artifact@v4
90+
with:
91+
name: build_${{ matrix.language }}.make
92+
path: .make
93+
include-hidden-files: true

.github/workflows/master.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,19 @@ jobs:
149149
uses: ./.github/actions/setup-tools
150150
with:
151151
tools: pulumictl, pulumicli, ${{ matrix.language }}
152+
- name: Prepare local workspace
153+
run: make prepare_local_workspace
152154
- name: Download bin
153155
uses: ./.github/actions/download-bin
154-
- name: Add NuGet source
155-
if: matrix.language == 'dotnet'
156-
run: dotnet nuget add source ${{ github.workspace }}/nuget
157156
- name: Download SDK
158157
uses: ./.github/actions/download-sdk
159158
with:
160159
language: ${{ matrix.language }}
160+
- name: Restore makefile progress
161+
uses: actions/download-artifact@v4
162+
with:
163+
name: build_${{ matrix.language }}.make
164+
path: .make
161165
- name: Update path
162166
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
163167
- name: Install Python deps

.github/workflows/prerelease.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,19 @@ jobs:
9191
uses: ./.github/actions/setup-tools
9292
with:
9393
tools: pulumictl, pulumicli, nodejs, python, dotnet, go, java
94+
- name: Prepare local workspace
95+
run: make prepare_local_workspace
9496
- name: Download bin
9597
uses: ./.github/actions/download-bin
96-
- name: Add NuGet source
97-
if: matrix.language == 'dotnet'
98-
run: dotnet nuget add source ${{ github.workspace }}/nuget
9998
- name: Download SDK
10099
uses: ./.github/actions/download-sdk
101100
with:
102101
language: ${{ matrix.language }}
102+
- name: Restore makefile progress
103+
uses: actions/download-artifact@v4
104+
with:
105+
name: build_${{ matrix.language }}.make
106+
path: .make
103107
- name: Update path
104108
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
105109
- name: Install Python deps

.github/workflows/prerequisites.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,16 @@ jobs:
6161
path: |
6262
.pulumi/examples-cache
6363
key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }}
64-
- name: Prepare upstream code
65-
run: make upstream
6664
- name: Setup tools
6765
uses: ./.github/actions/setup-tools
6866
with:
6967
tools: go, pulumictl, pulumicli, schema-tools
70-
- name: Build schema generator binary
71-
run: make tfgen_build_only
72-
- name: Install plugins
73-
run: make install_plugins
68+
- name: Prepare local workspace before restoring previously built files
69+
run: make prepare_local_workspace
7470
- name: Generate schema
75-
run: make tfgen_no_deps
71+
run: make schema
7672
- name: Build provider binary
77-
run: make provider_no_deps
73+
run: make provider
7874
- name: Unit-test provider code
7975
run: make test_provider
8076
- if: inputs.is_pr
@@ -86,6 +82,12 @@ jobs:
8682
schema-tools compare -r github://api.github.com/pulumi -p keycloak -o "${{ inputs.default_branch }}" -n --local-path=provider/cmd/pulumi-resource-keycloak/schema.json;
8783
echo "$EOF";
8884
} >> "$GITHUB_ENV"
85+
- name: Save makefile progress
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: prerequisites.make
89+
path: .make
90+
include-hidden-files: true
8991
- if: inputs.is_pr && inputs.is_automated == false
9092
name: Comment on PR with Details of Schema Check
9193
uses: thollander/actions-comment-pull-request@v2

.github/workflows/release.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,19 @@ jobs:
9797
uses: ./.github/actions/setup-tools
9898
with:
9999
tools: pulumictl, pulumicli, ${{ matrix.language }}
100+
- name: Prepare local workspace
101+
run: make prepare_local_workspace
100102
- name: Download bin
101103
uses: ./.github/actions/download-bin
102-
- name: Add NuGet source
103-
if: matrix.language == 'dotnet'
104-
run: dotnet nuget add source ${{ github.workspace }}/nuget
105104
- name: Download SDK
106105
uses: ./.github/actions/download-sdk
107106
with:
108107
language: ${{ matrix.language }}
108+
- name: Restore makefile progress
109+
uses: actions/download-artifact@v4
110+
with:
111+
name: build_${{ matrix.language }}.make
112+
path: .make
109113
- name: Update path
110114
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
111115
- name: Install Python deps

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

+7-3
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,19 @@ jobs:
146146
uses: ./.github/actions/setup-tools
147147
with:
148148
tools: pulumictl, pulumicli, ${{ matrix.language }}
149+
- name: Prepare local workspace
150+
run: make prepare_local_workspace
149151
- name: Download bin
150152
uses: ./.github/actions/download-bin
151-
- name: Add NuGet source
152-
if: matrix.language == 'dotnet'
153-
run: dotnet nuget add source ${{ github.workspace }}/nuget
154153
- name: Download SDK
155154
uses: ./.github/actions/download-sdk
156155
with:
157156
language: ${{ matrix.language }}
157+
- name: Restore makefile progress
158+
uses: actions/download-artifact@v4
159+
with:
160+
name: build_${{ matrix.language }}.make
161+
path: .make
158162
- name: Update path
159163
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
160164
- name: Install Python deps

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,7 @@ sdk/java/gradlew.bat
2828

2929

3030
sdk/python/venv
31+
32+
33+
# Ignore local build tracking directory
34+
.make

0 commit comments

Comments
 (0)