Skip to content

Commit cbbc19b

Browse files
Copilothenrymercer
andcommitted
Add ubuntu-slim runner support for lightweight workflows
Co-authored-by: henrymercer <[email protected]>
1 parent d363b1c commit cbbc19b

File tree

9 files changed

+17
-6
lines changed

9 files changed

+17
-6
lines changed

.github/workflows/__cleanup-db-cluster-dir.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__config-input.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__language-aliases.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/check-expected-release-files.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ defaults:
1515

1616
jobs:
1717
check-expected-release-files:
18-
runs-on: ubuntu-latest
18+
runs-on: ubuntu-slim
1919

2020
permissions:
2121
contents: read

.github/workflows/label-pr-size.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ permissions:
1616
jobs:
1717
sizeup:
1818
name: Label PR with size
19-
runs-on: ubuntu-latest
19+
runs-on: ubuntu-slim
2020

2121
steps:
2222
- name: Run sizeup

pr-checks/checks/cleanup-db-cluster-dir.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: "Clean up database cluster directory"
22
description: "The database cluster directory is cleaned up if it is not empty."
33
versions: ["linked"]
4+
runnerImages: ["ubuntu-slim"]
45
steps:
56
- name: Add a file to the database cluster directory
67
run: |

pr-checks/checks/config-input.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: "Config input"
22
description: "Tests specifying configuration using the config input"
33
installNode: true
44
versions: ["linked"]
5+
runnerImages: ["ubuntu-slim"]
56
steps:
67
- name: Copy queries into workspace
78
run: |

pr-checks/checks/language-aliases.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: "Language aliases"
22
description: "Tests that language aliases are resolved correctly"
33
versions: ["linked"]
4+
runnerImages: ["ubuntu-slim"]
45
steps:
56
- uses: ./../action/init
67
with:

pr-checks/sync.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,15 @@ def writeHeader(checkStream):
7676
if version == "latest":
7777
raise ValueError('Did not recognize "version: latest". Did you mean "version: linked"?')
7878

79-
runnerImages = ["ubuntu-latest", "macos-latest", "windows-latest"]
79+
# Check if a specific runner image is specified in the check
80+
customRunnerImages = checkSpecification.get('runnerImages')
81+
if customRunnerImages:
82+
# Use custom runner images specified in the check
83+
runnerImages = customRunnerImages
84+
else:
85+
# Use default runner images based on operating systems
86+
runnerImages = ["ubuntu-latest", "macos-latest", "windows-latest"]
87+
8088
operatingSystems = checkSpecification.get('operatingSystems', ["ubuntu"])
8189

8290
for operatingSystem in operatingSystems:

0 commit comments

Comments
 (0)