Skip to content

Commit af7fa09

Browse files
Pin versions of 3rd-party actions and GitHub runners (#41)
Google's terms for allowing the use of GitHub Actions on Google-owned repositories requires that third-party actions be referenced using a specific commit, not a tagged release or a branch name. They also recommend that GitHub-hosted runners be referenced by fixed versions and not "-latest". (Internal doc link: go/github-actions#actions) The SHAs for GitHub Actions in this commit were obtained using [frizbee](https://github.com/stacklok/frizbee). The runner versions equivalent to the "-latest" runners are based on the table at https://github.com/actions/runner-images
2 parents 2d0e745 + 1fc0fdf commit af7fa09

3 files changed

Lines changed: 38 additions & 26 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,32 @@
1515

1616
name: Build and Test
1717

18-
on: [push]
18+
on:
19+
pull_request:
20+
types: [opened, synchronize]
21+
branches:
22+
- main
23+
24+
merge_group:
25+
types:
26+
- checks_requested
27+
28+
push:
29+
# Allow manual invocation.
30+
workflow_dispatch:
1931

2032
jobs:
2133
buid-and-test:
22-
runs-on: ubuntu-latest
34+
runs-on: ubuntu-24.04
2335

2436
strategy:
2537
fail-fast: false
2638

2739
steps:
28-
- uses: actions/checkout@v4
40+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2941

3042
- name: Set up Python 3.10
31-
uses: actions/setup-python@v3
43+
uses: actions/setup-python@3542bca2639a428e1796aaa6a2ffef0c0f575566 # v3
3244
with:
3345
python-version: '3.10'
3446

.github/workflows/prerelease.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ permissions:
1010

1111
jobs:
1212
create_version:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-24.04
1414
steps:
15-
- uses: actions/checkout@v4
16-
- uses: actions/setup-python@v5
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
16+
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
1717
with:
1818
python-version: '3.10'
1919
- name: Create version
@@ -33,19 +33,19 @@ jobs:
3333
fail-fast: false
3434
matrix:
3535
include:
36-
- os: ubuntu-latest
36+
- os: ubuntu-24.04
3737
arch: x86_64
38-
- os: windows-latest
38+
- os: windows-2022
3939
arch: auto
40-
- os: macos-latest
40+
- os: macos-14
4141
arch: auto
4242
- os: macos-13
4343
arch: auto
4444

4545
steps:
46-
- uses: actions/checkout@v4
46+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
4747
- name: Set up Python
48-
uses: actions/setup-python@v5
48+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
4949
with:
5050
python-version: '3.10'
5151
- name: Install dependencies
@@ -66,19 +66,19 @@ jobs:
6666
run: |
6767
python -m cibuildwheel --output-dir wheelhouse
6868
69-
- uses: actions/upload-artifact@v4
69+
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
7070
with:
7171
name: python-wheels-${{ matrix.os }}
7272
path: ./wheelhouse/*.whl
7373

7474
release-wheels:
7575
name: Publish all wheels
7676
needs: [build_wheels]
77-
runs-on: ubuntu-latest
77+
runs-on: ubuntu-24.04
7878

7979
steps:
8080
- name: Download build artifacts
81-
uses: actions/download-artifact@v4
81+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
8282
with:
8383
pattern: python-wheels-*
8484
merge-multiple: true

.github/workflows/stable-release-workflow.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ permissions:
99

1010
jobs:
1111
create_version:
12-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-24.04
1313
steps:
14-
- uses: actions/checkout@v4
15-
- uses: actions/setup-python@v5
14+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
15+
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
1616
with:
1717
python-version: '3.10'
1818
- name: Create version
@@ -32,19 +32,19 @@ jobs:
3232
fail-fast: true
3333
matrix:
3434
include:
35-
- os: ubuntu-latest
35+
- os: ubuntu-24.04
3636
arch: x86_64
37-
- os: windows-latest
37+
- os: windows-2022
3838
arch: auto
39-
- os: macos-latest
39+
- os: macos-14
4040
arch: auto
4141
- os: macos-13
4242
arch: auto
4343

4444
steps:
45-
- uses: actions/checkout@v4
45+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
4646
- name: Set up Python
47-
uses: actions/setup-python@v5
47+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
4848
with:
4949
python-version: '3.10'
5050
- name: Install dependencies
@@ -65,19 +65,19 @@ jobs:
6565
run: |
6666
python -m cibuildwheel --output-dir wheelhouse
6767
68-
- uses: actions/upload-artifact@v4
68+
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
6969
with:
7070
name: python-wheels-${{ matrix.os }}
7171
path: ./wheelhouse/*.whl
7272

7373
release-wheels:
7474
name: Publish all wheels
7575
needs: [build_wheels]
76-
runs-on: ubuntu-latest
76+
runs-on: ubuntu-24.04
7777

7878
steps:
7979
- name: Download build artifacts
80-
uses: actions/download-artifact@v4
80+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
8181
with:
8282
pattern: python-wheels-*
8383
merge-multiple: true

0 commit comments

Comments
 (0)