Skip to content

Commit 38c8f81

Browse files
authored
Merge pull request #1039 from rust-lang/maint
Upgrade docker/build-push-action to v5
2 parents 83910bd + eb927cb commit 38c8f81

File tree

3 files changed

+47
-52
lines changed

3 files changed

+47
-52
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@ jobs:
2727
IMAGE_NAME: ghcr.io/integer32llc/rust-playground-ci-rust-${{ matrix.channel }}
2828
steps:
2929
- name: Checkout code
30-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
3131
with:
3232
ref: "${{ github.event.pull_request.head.sha }}"
3333
- name: Set up Docker Buildx
34-
uses: docker/setup-buildx-action@v2
34+
uses: docker/setup-buildx-action@v3
3535
with:
3636
driver-opts: image=moby/buildkit:v0.11.6
3737
- name: Login to GitHub Container Registry
38-
uses: docker/login-action@v2
38+
uses: docker/login-action@v3
3939
with:
4040
registry: ghcr.io
4141
username: "${{ env.GH_CONTAINER_REGISTRY_USERNAME }}"
4242
password: "${{ secrets.GH_CONTAINER_REGISTRY_TOKEN }}"
4343
- name: Build and push container
44-
uses: docker/build-push-action@v4
44+
uses: docker/build-push-action@v5
4545
with:
4646
context: compiler/base/
4747
file: compiler/base/Dockerfile
@@ -56,7 +56,7 @@ jobs:
5656
if: 'github.event_name == ''push'' || contains(github.event.pull_request.labels.*.name, ''CI: approved'')'
5757
steps:
5858
- name: Checkout code
59-
uses: actions/checkout@v3
59+
uses: actions/checkout@v4
6060
with:
6161
ref: "${{ github.event.pull_request.head.sha }}"
6262
- name: Install Rust
@@ -72,7 +72,7 @@ jobs:
7272
- name: Build backend
7373
run: "./ci/build-backend.sh"
7474
- name: Save backend artifact
75-
uses: actions/upload-artifact@v3
75+
uses: actions/upload-artifact@v4
7676
with:
7777
name: backend
7878
path: |
@@ -85,11 +85,11 @@ jobs:
8585
if: 'github.event_name == ''push'' || contains(github.event.pull_request.labels.*.name, ''CI: approved'')'
8686
steps:
8787
- name: Checkout code
88-
uses: actions/checkout@v3
88+
uses: actions/checkout@v4
8989
with:
9090
ref: "${{ github.event.pull_request.head.sha }}"
9191
- name: Configure node
92-
uses: actions/setup-node@v3
92+
uses: actions/setup-node@v4
9393
with:
9494
node-version: 18.14
9595
- name: Get pnpm version from package.json
@@ -98,7 +98,7 @@ jobs:
9898
9999
'
100100
- name: Install pnpm
101-
uses: pnpm/action-setup@v2.4.0
101+
uses: pnpm/action-setup@v3
102102
with:
103103
version: "${{ steps.pnpm-version.outputs.pnpm_version }}"
104104
- name: Get pnpm store directory
@@ -107,7 +107,7 @@ jobs:
107107
108108
'
109109
- name: Cache pnpm intermediate products
110-
uses: actions/cache@v3
110+
uses: actions/cache@v4
111111
with:
112112
path: "${{ steps.pnpm-cache-dir-path.outputs.dir }}"
113113
key: "${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}"
@@ -123,7 +123,7 @@ jobs:
123123
- name: Build frontend
124124
run: pnpm --dir ui/frontend/ run build:production
125125
- name: Save frontend artifact
126-
uses: actions/upload-artifact@v3
126+
uses: actions/upload-artifact@v4
127127
with:
128128
name: frontend
129129
path: ui/frontend/build
@@ -140,15 +140,15 @@ jobs:
140140
working-directory: tests
141141
steps:
142142
- name: Checkout code
143-
uses: actions/checkout@v3
143+
uses: actions/checkout@v4
144144
with:
145145
ref: "${{ github.event.pull_request.head.sha }}"
146146
- name: Configure Ruby
147147
uses: ruby/setup-ruby@v1
148148
with:
149149
ruby-version: 3.0.2
150150
- name: Cache bundler intermediate products
151-
uses: actions/cache@v3
151+
uses: actions/cache@v4
152152
with:
153153
path: tests/vendor/bundle
154154
key: "${{ runner.os }}-gems-${{ hashFiles('tests/**/Gemfile.lock') }}"
@@ -168,12 +168,12 @@ jobs:
168168
docker tag ghcr.io/integer32llc/rust-playground-ci-rust-$c:${{ github.run_id }} rust-$c
169169
done
170170
- name: Download backend
171-
uses: actions/download-artifact@v3
171+
uses: actions/download-artifact@v4
172172
with:
173173
name: backend
174174
path: tests/server/
175175
- name: Download frontend
176-
uses: actions/download-artifact@v3
176+
uses: actions/download-artifact@v4
177177
with:
178178
name: frontend
179179
path: tests/server/build/
@@ -195,7 +195,7 @@ jobs:
195195
bundle exec rspec
196196
- name: Preserve screenshots
197197
if: "${{ failure() }}"
198-
uses: actions/upload-artifact@v3
198+
uses: actions/upload-artifact@v4
199199
with:
200200
name: test-failures
201201
path: tests/test-failures
@@ -210,13 +210,13 @@ jobs:
210210
id-token: write
211211
steps:
212212
- name: Login to GitHub Container Registry
213-
uses: docker/login-action@v2
213+
uses: docker/login-action@v3
214214
with:
215215
registry: ghcr.io
216216
username: "${{ env.GH_CONTAINER_REGISTRY_USERNAME }}"
217217
password: "${{ secrets.GH_CONTAINER_REGISTRY_TOKEN }}"
218218
- name: Login to Docker Hub
219-
uses: docker/login-action@v2
219+
uses: docker/login-action@v3
220220
with:
221221
username: "${{ env.DOCKER_HUB_USERNAME }}"
222222
password: "${{ secrets.DOCKER_HUB_TOKEN }}"
@@ -236,17 +236,17 @@ jobs:
236236
docker push shepmaster/rust-$c
237237
done
238238
- name: Download backend
239-
uses: actions/download-artifact@v3
239+
uses: actions/download-artifact@v4
240240
with:
241241
name: backend
242242
path: server/
243243
- name: Download frontend
244-
uses: actions/download-artifact@v3
244+
uses: actions/download-artifact@v4
245245
with:
246246
name: frontend
247247
path: server/build/
248248
- name: Configure AWS credentials (i32)
249-
uses: aws-actions/configure-aws-credentials@v2
249+
uses: aws-actions/configure-aws-credentials@v4
250250
with:
251251
aws-access-key-id: "${{ env.AWS_ACCESS_KEY_ID }}"
252252
aws-secret-access-key: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
@@ -256,7 +256,7 @@ jobs:
256256
- name: Push frontend (i32)
257257
run: aws s3 sync server/build/ s3://playground-artifacts-i32/build
258258
- name: Configure AWS credentials (rust-lang)
259-
uses: aws-actions/configure-aws-credentials@v2
259+
uses: aws-actions/configure-aws-credentials@v4
260260
with:
261261
role-skip-session-tagging: true
262262
role-to-assume: arn:aws:iam::890664054962:role/upload-playground-artifacts

.github/workflows/cron.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,24 @@ jobs:
2525
continue-on-error: true
2626
steps:
2727
- name: Checkout code
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2929
- name: Set up Docker Buildx
30-
uses: docker/setup-buildx-action@v2
30+
uses: docker/setup-buildx-action@v3
3131
with:
3232
driver-opts: image=moby/buildkit:v0.11.6
3333
- name: Login to GitHub Container Registry
34-
uses: docker/login-action@v2
34+
uses: docker/login-action@v3
3535
with:
3636
registry: ghcr.io
3737
username: "${{ env.GH_CONTAINER_REGISTRY_USERNAME }}"
3838
password: "${{ secrets.GH_CONTAINER_REGISTRY_TOKEN }}"
3939
- name: Login to Docker Hub
40-
uses: docker/login-action@v2
40+
uses: docker/login-action@v3
4141
with:
4242
username: "${{ env.DOCKER_HUB_USERNAME }}"
4343
password: "${{ secrets.DOCKER_HUB_TOKEN }}"
4444
- name: Build and push container
45-
uses: docker/build-push-action@v4
45+
uses: docker/build-push-action@v5
4646
with:
4747
context: compiler/base/
4848
file: compiler/base/Dockerfile

ci/workflows.yml

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,34 @@ components:
77

88
- checkout: &checkout
99
name: "Checkout code"
10-
uses: actions/checkout@v3
10+
uses: actions/checkout@v4
1111

1212
# This should only be used when we know that the code being tested
1313
# doesn't make use of our secrets or elevated GitHub token.
1414
- checkout_pr: &checkout_pr
1515
name: "Checkout code"
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
with:
1818
ref: ${{ github.event.pull_request.head.sha }}
1919

2020
- docker_buildx: &docker_buildx
2121
name: "Set up Docker Buildx"
22-
uses: docker/setup-buildx-action@v2
22+
uses: docker/setup-buildx-action@v3
2323
with:
2424
driver-opts: >-
2525
image=moby/buildkit:v0.11.6
2626
2727
- login_ghcr: &login_ghcr
2828
name: "Login to GitHub Container Registry"
29-
uses: docker/login-action@v2
29+
uses: docker/login-action@v3
3030
with:
3131
registry: ghcr.io
3232
username: ${{ env.GH_CONTAINER_REGISTRY_USERNAME }}
3333
password: ${{ secrets.GH_CONTAINER_REGISTRY_TOKEN }}
3434

3535
- login_docker_hub: &login_docker_hub
3636
name: "Login to Docker Hub"
37-
uses: docker/login-action@v2
37+
uses: docker/login-action@v3
3838
with:
3939
username: ${{ env.DOCKER_HUB_USERNAME }}
4040
password: ${{ secrets.DOCKER_HUB_TOKEN }}
@@ -52,7 +52,7 @@ components:
5252

5353
- build_compiler_containers: &build_compiler_containers
5454
name: "Build and push container"
55-
uses: docker/build-push-action@v4
55+
uses: docker/build-push-action@v5
5656
with:
5757
context: compiler/base/
5858
file: compiler/base/Dockerfile
@@ -147,7 +147,7 @@ workflows:
147147
run: ./ci/build-backend.sh
148148

149149
- name: "Save backend artifact"
150-
uses: actions/upload-artifact@v3
150+
uses: actions/upload-artifact@v4
151151
with:
152152
name: backend
153153
path: |
@@ -164,7 +164,7 @@ workflows:
164164
- *checkout_pr
165165

166166
- name: "Configure node"
167-
uses: actions/setup-node@v3
167+
uses: actions/setup-node@v4
168168
with:
169169
node-version: 18.14
170170

@@ -174,7 +174,7 @@ workflows:
174174
echo "pnpm_version=$(node -p 'require(`./ui/frontend/package.json`).engines.pnpm')" >> $GITHUB_OUTPUT
175175
176176
- name: "Install pnpm"
177-
uses: pnpm/action-setup@v2.4.0
177+
uses: pnpm/action-setup@v3
178178
with:
179179
version: ${{ steps.pnpm-version.outputs.pnpm_version }}
180180

@@ -184,7 +184,7 @@ workflows:
184184
echo "dir=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
185185
186186
- name: "Cache pnpm intermediate products"
187-
uses: actions/cache@v3
187+
uses: actions/cache@v4
188188
with:
189189
path: ${{ steps.pnpm-cache-dir-path.outputs.dir }}
190190
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
@@ -212,7 +212,7 @@ workflows:
212212
pnpm --dir ui/frontend/ run build:production
213213
214214
- name: "Save frontend artifact"
215-
uses: actions/upload-artifact@v3
215+
uses: actions/upload-artifact@v4
216216
with:
217217
name: frontend
218218
path: ui/frontend/build
@@ -239,7 +239,7 @@ workflows:
239239
ruby-version: '3.0.2'
240240

241241
- name: "Cache bundler intermediate products"
242-
uses: actions/cache@v3
242+
uses: actions/cache@v4
243243
with:
244244
path: tests/vendor/bundle
245245
key: ${{ runner.os }}-gems-${{ hashFiles('tests/**/Gemfile.lock') }}
@@ -256,13 +256,13 @@ workflows:
256256
- *rename_all_containers
257257

258258
- name: "Download backend"
259-
uses: actions/download-artifact@v3
259+
uses: actions/download-artifact@v4
260260
with:
261261
name: backend
262262
path: tests/server/
263263

264264
- name: "Download frontend"
265-
uses: actions/download-artifact@v3
265+
uses: actions/download-artifact@v4
266266
with:
267267
name: frontend
268268
path: tests/server/build/
@@ -290,7 +290,7 @@ workflows:
290290
291291
- name: "Preserve screenshots"
292292
if: ${{ failure() }}
293-
uses: actions/upload-artifact@v3
293+
uses: actions/upload-artifact@v4
294294
with:
295295
name: test-failures
296296
path: tests/test-failures
@@ -307,12 +307,7 @@ workflows:
307307

308308
steps:
309309
- *login_ghcr
310-
311-
- name: "Login to Docker Hub"
312-
uses: docker/login-action@v2
313-
with:
314-
username: ${{ env.DOCKER_HUB_USERNAME }}
315-
password: ${{ secrets.DOCKER_HUB_TOKEN }}
310+
- *login_docker_hub
316311

317312
- *pull_containers
318313
- *rename_all_containers
@@ -325,19 +320,19 @@ workflows:
325320
done
326321
327322
- name: "Download backend"
328-
uses: actions/download-artifact@v3
323+
uses: actions/download-artifact@v4
329324
with:
330325
name: backend
331326
path: server/
332327

333328
- name: "Download frontend"
334-
uses: actions/download-artifact@v3
329+
uses: actions/download-artifact@v4
335330
with:
336331
name: frontend
337332
path: server/build/
338333

339334
- name: "Configure AWS credentials (i32)"
340-
uses: aws-actions/configure-aws-credentials@v2
335+
uses: aws-actions/configure-aws-credentials@v4
341336
with:
342337
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
343338
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -352,7 +347,7 @@ workflows:
352347
aws s3 sync server/build/ s3://playground-artifacts-i32/build
353348
354349
- name: "Configure AWS credentials (rust-lang)"
355-
uses: aws-actions/configure-aws-credentials@v2
350+
uses: aws-actions/configure-aws-credentials@v4
356351
with:
357352
role-skip-session-tagging: true
358353
role-to-assume: arn:aws:iam::890664054962:role/upload-playground-artifacts

0 commit comments

Comments
 (0)