Skip to content

Commit 00295f5

Browse files
authored
chore: update workflows to use ubuntu-24.04 (#7241)
Change the runner environment for multiple GitHub Actions workflows from `ubuntu-latest` to `ubuntu-24.04` to ensure compatibility with the latest features and security updates. Additionally, adjust comments in the SDK spec test script for clarity and consistency.
1 parent c10997b commit 00295f5

15 files changed

+1684
-137
lines changed

.github/workflows/build.yml

+23-11
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
build:
2929
name: "Build"
3030
timeout-minutes: 30
31-
runs-on: ubuntu-latest
31+
runs-on: ubuntu-24.04
3232
outputs:
3333
version: ${{ fromJson(steps.changelog.outputs.data).newVersion }}
3434
last-version: ${{ fromJson(steps.changelog.outputs.data).lastVersion }}
@@ -44,7 +44,7 @@ jobs:
4444
fetch-depth: 0
4545

4646
- name: Setup pnpm
47-
uses: pnpm/action-setup@v3
47+
uses: pnpm/action-setup@v4
4848
with:
4949
version: ${{ env.PNPM_VERSION }}
5050

@@ -69,6 +69,11 @@ jobs:
6969
- name: Install Dependencies
7070
run: pnpm install --frozen-lockfile
7171

72+
- name: Install Terraform
73+
uses: hashicorp/setup-terraform@v3
74+
with:
75+
terraform_wrapper: false
76+
7277
- name: Derive appropriate SHAs for base and head
7378
id: shas
7479
uses: nrwl/nx-set-shas@v3
@@ -97,13 +102,13 @@ jobs:
97102
test:
98103
name: Test
99104
timeout-minutes: 30
100-
runs-on: ubuntu-latest
105+
runs-on: ubuntu-24.04
101106
steps:
102107
- name: Checkout
103108
uses: actions/checkout@v4
104109

105110
- name: Setup pnpm
106-
uses: pnpm/action-setup@v3
111+
uses: pnpm/action-setup@v4
107112
with:
108113
version: ${{ env.PNPM_VERSION }}
109114

@@ -128,9 +133,16 @@ jobs:
128133
- name: Install Playwright
129134
working-directory: wing-console/console/app
130135
run: |
131-
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
132136
pnpm exec playwright install --with-deps
133137
138+
- name: Install Terraform
139+
uses: hashicorp/setup-terraform@v3
140+
with:
141+
terraform_wrapper: false
142+
143+
- name: Verify Terraform installation
144+
run: terraform -v
145+
134146
- name: Test
135147
run: pnpm test:ci
136148

@@ -148,7 +160,7 @@ jobs:
148160
benchmark:
149161
name: Benchmark
150162
if: needs.build.outputs.bench-changed == 'true' || contains(github.event.pull_request.labels.*.name, '🧪 pr/e2e-full')
151-
runs-on: ubuntu-latest
163+
runs-on: ubuntu-24.04
152164
needs:
153165
- build
154166
steps:
@@ -162,7 +174,7 @@ jobs:
162174
path: dist
163175

164176
- name: Setup pnpm
165-
uses: pnpm/action-setup@v3
177+
uses: pnpm/action-setup@v4
166178
with:
167179
version: ${{ env.PNPM_VERSION }}
168180

@@ -224,7 +236,7 @@ jobs:
224236
uses: actions/checkout@v4
225237

226238
- name: Setup pnpm
227-
uses: pnpm/action-setup@v3
239+
uses: pnpm/action-setup@v4
228240
with:
229241
version: ${{ env.PNPM_VERSION }}
230242

@@ -277,7 +289,7 @@ jobs:
277289

278290
console-preview:
279291
name: "Console Preview"
280-
runs-on: ubuntu-latest
292+
runs-on: ubuntu-24.04
281293
needs:
282294
- build
283295
env:
@@ -324,7 +336,7 @@ jobs:
324336

325337
quality-gate:
326338
name: Quality Gate
327-
runs-on: ubuntu-latest
339+
runs-on: ubuntu-24.04
328340
if: ${{ !cancelled() }}
329341
needs:
330342
- build
@@ -362,7 +374,7 @@ jobs:
362374
needs:
363375
- quality-gate
364376
- build
365-
runs-on: ubuntu-latest
377+
runs-on: ubuntu-24.04
366378
steps:
367379
- name: Download Build Artifacts
368380
uses: actions/download-artifact@v4

.github/workflows/canary.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Canary Testing
22
on:
33
schedule:
4-
- cron: '0 * * * *'
4+
- cron: "0 * * * *"
55
workflow_dispatch: {}
66
release:
77
types:
@@ -16,7 +16,7 @@ jobs:
1616
fail-fast: true
1717
matrix:
1818
runner:
19-
- ubuntu-latest
19+
- ubuntu-24.04
2020
- windows-latest
2121
- macos-latest
2222
node:

.github/workflows/delete-console-preview.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313
jobs:
1414
destroy:
1515
name: "Destroy"
16-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-24.04
1717
if: ${{ github.event.pull_request.head.repo.full_name == github.repository && !startsWith(github.head_ref, 'mergify/merge-queue/') }}
1818
steps:
1919
- name: Install flyctl

.github/workflows/issue-backlogger.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
add-to-backlog:
1010
name: "Add issue to backlog"
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
1212
steps:
1313
- uses: actions/[email protected]
1414
with:

.github/workflows/matrix-update.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ env:
88

99
jobs:
1010
update:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
1212
steps:
1313
- name: Checkout Repository
1414
uses: actions/checkout@v4
1515

1616
- name: Setup pnpm
17-
uses: pnpm/action-setup@v3
17+
uses: pnpm/action-setup@v4
1818
with:
1919
version: ${{ env.PNPM_VERSION }}
2020

.github/workflows/mutation.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ permissions:
2020

2121
jobs:
2222
mutate:
23-
runs-on: ubuntu-latest
23+
runs-on: ubuntu-24.04
2424
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'failure' && (!contains(fromJSON('["main", "dev"]'), github.event.workflow_run.head_branch) || github.event.workflow_run.head_repository.fork)
2525
steps:
2626
- name: Download artifacts
@@ -50,7 +50,7 @@ jobs:
5050
It requires private repo read/write permissions." >> $GITHUB_STEP_SUMMARY
5151
exit 1
5252
fi
53-
53+
5454
- name: Find associated pull request
5555
id: pr
5656
uses: actions/github-script@v7

.github/workflows/new-pull-request-comment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111

1212
jobs:
1313
comment:
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-24.04
1515
if: ${{ !startsWith(github.head_ref, 'mergify/merge-queue/') }}
1616
steps:
1717
- name: Comment on new PR

.github/workflows/periodic-azure-clean.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010

1111
jobs:
1212
azure-cleanup:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-24.04
1414
steps:
1515
- name: test if is maintainer
1616
uses: tspascoal/get-user-teams-membership@v3

.github/workflows/pull-request-lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
validate:
1313
name: Validate PR title
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-24.04
1515
if: ${{ !startsWith(github.head_ref, 'mergify/merge-queue/') }}
1616
steps:
1717
- uses: amannn/[email protected]

.github/workflows/release-commenter.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
release:
1010
name: "Post release comments"
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
1212
steps:
1313
- uses: apexskier/github-release-commenter@v1
1414
with:

.github/workflows/sdk-spec-test.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ env:
5151

5252
jobs:
5353
setup:
54-
runs-on: ubuntu-latest
54+
runs-on: ubuntu-24.04
5555
steps:
5656
- name: test if is maintainer
5757
uses: tspascoal/get-user-teams-membership@v3
@@ -75,7 +75,8 @@ jobs:
7575
- name: Get list of directories and save them to the output
7676
id: setdirs
7777
shell: bash
78-
run: | # TODO: skipping std, math and external folders, when https://github.com/winglang/wing/issues/3168 is resolve- we'll skip only the external folder.
78+
run:
79+
| # TODO: skipping std, math and external folders, when https://github.com/winglang/wing/issues/3168 is resolve- we'll skip only the external folder.
7980
dirs=$(ls -d tests/sdk_tests/*/ | sed 's/\/$//' | grep -v "external\|std\|math" | jq -R -s -c 'split("\n")[:-1]')
8081
processed_dirs=$(echo "{ \"directory\": $dirs }" | jq -c '[ .directory[] | {directory: ., name: (split("/") | last)}]')
8182
wrapped_dirs=$(echo $processed_dirs | jq -c .)
@@ -99,7 +100,7 @@ jobs:
99100

100101
test:
101102
needs: setup
102-
runs-on: ubuntu-latest
103+
runs-on: ubuntu-24.04
103104
strategy:
104105
fail-fast: false
105106
max-parallel: 10
@@ -116,7 +117,7 @@ jobs:
116117

117118
- name: Setup pnpm
118119
if: ${{ env.MANUAL == 'true' }}
119-
uses: pnpm/action-setup@v3
120+
uses: pnpm/action-setup@v4
120121
with:
121122
version: ${{ env.PNPM_VERSION }}
122123

.github/workflows/update-docsite.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
update-docsite:
1010
name: Dispatch docsite update workflow event
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
1212
steps:
1313
- run: |
1414
curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer $GITHUB_TOKEN" https://api.github.com/repos/winglang/docsite/actions/workflows/41365537/dispatches -d '{"ref":"main"}'

docs/docs/08-guides/02-ci-cd.md

+23-14
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
---
22
title: CI/CD
33
id: ci-cd
4-
keywords: [CICD, Continuous Integration, Continuous Deployment, Deployment, GitHub Actions]
4+
keywords:
5+
[
6+
CICD,
7+
Continuous Integration,
8+
Continuous Deployment,
9+
Deployment,
10+
GitHub Actions,
11+
]
512
---
613

714
Wing supports compilation to various targets including `tf-aws`, `tf-azure`, and `tf-gcp`. After compilation, Wing does not impose a specific deployment method for your infrastructure. Its Terraform target compatibility ensures that nearly all existing services can be utilized for deployment, offering considerable flexibility to choose the approach best aligned with your organizational needs or preferences.
815

916
This guide will detail the complete deployment lifecycle of a Wing application using GitHub Actions and the `tf-aws` target.
1017

1118
## Setup
19+
1220
### Managing Access for GitHub Actions and AWS
1321

1422
It's generally discouraged to use static, long-lived IAM user credentials due to associated security risks.
@@ -53,16 +61,16 @@ concurrency:
5361

5462
permissions:
5563
id-token: write # This is required for requesting the JWT
56-
contents: read # This is required for actions/checkout
64+
contents: read # This is required for actions/checkout
5765

5866
env:
59-
AWS_REGION: 'us-east-1'
60-
TF_BACKEND_BUCKET: 'my-terraform-state-bucket-with-a-globally-unique-name'
61-
TF_BACKEND_BUCKET_REGION: 'us-east-1'
67+
AWS_REGION: "us-east-1"
68+
TF_BACKEND_BUCKET: "my-terraform-state-bucket-with-a-globally-unique-name"
69+
TF_BACKEND_BUCKET_REGION: "us-east-1"
6270

6371
jobs:
6472
deploy:
65-
runs-on: ubuntu-latest
73+
runs-on: ubuntu-24.04
6674
steps:
6775
- name: Checkout Repository
6876
uses: actions/checkout@v4
@@ -76,7 +84,7 @@ jobs:
7684
uses: winglang/wing-github-action/actions/deploy@main
7785
with:
7886
entry: main.w
79-
target: 'tf-aws'
87+
target: "tf-aws"
8088
```
8189
8290
### Pull Request Diffs
@@ -88,17 +96,17 @@ on: [pull_request]
8896

8997
permissions:
9098
id-token: write # This is required for requesting the JWT
91-
contents: read # This is required for actions/checkout
99+
contents: read # This is required for actions/checkout
92100
pull-requests: write # This is required for commenting on PRs
93101

94102
env:
95-
AWS_REGION: 'us-east-1'
96-
TF_BACKEND_BUCKET: 'my-terraform-state-bucket-with-a-globally-unique-name'
97-
TF_BACKEND_BUCKET_REGION: 'us-east-1'
103+
AWS_REGION: "us-east-1"
104+
TF_BACKEND_BUCKET: "my-terraform-state-bucket-with-a-globally-unique-name"
105+
TF_BACKEND_BUCKET_REGION: "us-east-1"
98106

99107
jobs:
100108
build:
101-
runs-on: ubuntu-latest
109+
runs-on: ubuntu-24.04
102110
steps:
103111
- name: Checkout Repository
104112
uses: actions/checkout@v4
@@ -112,9 +120,10 @@ jobs:
112120
uses: winglang/wing-github-action/actions/pull-request-diff@main
113121
with:
114122
entry: main.w
115-
target: 'tf-aws'
123+
target: "tf-aws"
116124
github-token: ${{ secrets.GITHUB_TOKEN }}
117125
```
126+
118127
## Custom GitHub Actions Workflow for AWS
119128
120129
Most users will find using the Wing GitHub Action within GitHub Actions as the simplest and most effective method. However, if you have specific requirements such as additional build steps, you may need to create your own custom GitHub Actions Workflow.
@@ -191,7 +200,7 @@ env:
191200

192201
jobs:
193202
deploy:
194-
runs-on: ubuntu-latest
203+
runs-on: ubuntu-24.04
195204
steps:
196205
- name: Checkout Repository
197206
uses: actions/checkout@v4

0 commit comments

Comments
 (0)