From f22faa1b732470140393b17197b3bfa42258ad91 Mon Sep 17 00:00:00 2001 From: Robin Grell Date: Thu, 26 Nov 2026 19:27:59 -0600 Subject: [PATCH] Add a GitHub Actions lockfile .github/workflows/actions.lock pins every action, including the actions those actions use, to an exact commit. gh actions-lock moved the commit SHAs out of the uses: lines into the lockfile; the same commits stay pinned. verify-lockfile.yml checks the lockfile whenever something under .github changes. Co-Authored-By: Claude --- .github/workflows/CI.yml | 8 ++++---- .github/workflows/actions.lock | 27 +++++++++++++++++++++++++++ .github/workflows/verify-lockfile.yml | 23 +++++++++++++++++++++++ 3 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/actions.lock create mode 100644 .github/workflows/verify-lockfile.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index caf9351..82f8243 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -31,12 +31,12 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-latest] steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@v6.0.2 env: GIT_CONFIG_GLOBAL: ${{ runner.temp }}/.gitconfig-blank # Create a blank gitconfig file in the temp directory. Ensures local gitconfig is not used. - name: Setup Node - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@v6.4.0 with: node-version: 24 cache: npm @@ -71,7 +71,7 @@ jobs: permissions: contents: write # create the GitHub Release for this tag steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@v6.0.2 env: GIT_CONFIG_GLOBAL: ${{ runner.temp }}/.gitconfig-blank # Create a blank gitconfig file in the temp directory. Ensures local gitconfig is not used. @@ -79,7 +79,7 @@ jobs: # `//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}`, so the publish # step below picks up the NPM_TOKEN secret automatically. - name: Setup Node - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + uses: actions/setup-node@v6.4.0 with: node-version: 24 cache: npm diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock new file mode 100644 index 0000000..2cf5974 --- /dev/null +++ b/.github/workflows/actions.lock @@ -0,0 +1,27 @@ +# This file is machine-generated by `gh actions-lock`. +# Do not edit by hand; run `gh actions-lock` to update. +# Docs: https://gh.io/actions-lockfile +version: 'v0.0.3' +workflows: + '.github/workflows/CI.yml': + - 'actions/checkout@v6.0.2' + - 'actions/setup-node@v6.4.0' + '.github/workflows/verify-lockfile.yml': + - 'actions/checkout@v6.0.2' + - 'github/gh-actions-lock@verify/v0.5.1' +dependencies: + 'actions/checkout@v6.0.2': + ref: 'v6.0.2' + commit: 'sha1-de0fac2e4500dabe0009e67214ff5f5447ce83dd' + owner_id: 44036562 + repo_id: 197814629 + 'actions/setup-node@v6.4.0': + ref: 'v6.4.0' + commit: 'sha1-48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e' + owner_id: 44036562 + repo_id: 189476904 + 'github/gh-actions-lock@verify/v0.5.1': + ref: 'verify/v0.5.1' + commit: 'sha1-5fa07d19c267d19e29f4341f10fdf7f516375038' + owner_id: 9919 + repo_id: 1217640442 diff --git a/.github/workflows/verify-lockfile.yml b/.github/workflows/verify-lockfile.yml new file mode 100644 index 0000000..2fe4870 --- /dev/null +++ b/.github/workflows/verify-lockfile.yml @@ -0,0 +1,23 @@ +name: Verify actions lockfile + +on: + pull_request: + paths: + - .github/** + push: + branches: + - main + paths: + - .github/** + +permissions: + contents: read + +jobs: + verify: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6.0.2 + with: + persist-credentials: false + - uses: github/gh-actions-lock@verify/v0.5.1