From 5f6fc0005f28fd892a90c849d580a53a6e4e1743 Mon Sep 17 00:00:00 2001 From: Timid Robot Zehta Date: Thu, 19 Nov 2026 22:11:12 +0100 Subject: [PATCH 1/4] lock GitHub Actions dependencies --- .github/workflows/actions.lock | 75 ++++++++++++++++++++++++++ .github/workflows/prek_checks.yml | 8 +-- .github/workflows/trixie-dev.yml | 18 +++---- .github/workflows/trixie-msmtp-dev.yml | 17 +++--- .github/workflows/trixie-msmtp.yml | 18 +++---- .github/workflows/trixie.yml | 18 +++---- .github/workflows/util-raw-dev.yml | 18 +++---- .github/workflows/util-raw.yml | 18 +++---- 8 files changed, 121 insertions(+), 69 deletions(-) create mode 100644 .github/workflows/actions.lock diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock new file mode 100644 index 0000000..baa59c2 --- /dev/null +++ b/.github/workflows/actions.lock @@ -0,0 +1,75 @@ +# 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/prek_checks.yml': + - 'actions/checkout@v7.0.1' + - 'j178/prek-action@v3.1.0' + '.github/workflows/trixie-dev.yml': + - 'actions/checkout@v7.0.1' + - 'docker/build-push-action@v7.4.0' + - 'docker/login-action@v4.8.0' + - 'docker/metadata-action@v6.2.0' + - 'docker/setup-buildx-action@v4.4.1' + '.github/workflows/trixie-msmtp-dev.yml': + - 'actions/checkout@v7.0.1' + - 'docker/build-push-action@v7.4.0' + - 'docker/login-action@v4.8.0' + - 'docker/metadata-action@v6.2.0' + - 'docker/setup-buildx-action@v4.4.1' + '.github/workflows/trixie-msmtp.yml': + - 'actions/checkout@v7.0.1' + - 'docker/build-push-action@v7.4.0' + - 'docker/login-action@v4.8.0' + - 'docker/metadata-action@v6.2.0' + - 'docker/setup-buildx-action@v4.4.1' + '.github/workflows/trixie.yml': + - 'actions/checkout@v7.0.1' + - 'docker/build-push-action@v7.4.0' + - 'docker/login-action@v4.8.0' + - 'docker/metadata-action@v6.2.0' + - 'docker/setup-buildx-action@v4.4.1' + '.github/workflows/util-raw-dev.yml': + - 'actions/checkout@v7.0.1' + - 'docker/build-push-action@v7.4.0' + - 'docker/login-action@v4.8.0' + - 'docker/metadata-action@v6.2.0' + - 'docker/setup-buildx-action@v4.4.1' + '.github/workflows/util-raw.yml': + - 'actions/checkout@v7.0.1' + - 'docker/build-push-action@v7.4.0' + - 'docker/login-action@v4.8.0' + - 'docker/metadata-action@v6.2.0' + - 'docker/setup-buildx-action@v4.4.1' +dependencies: + 'actions/checkout@v7.0.1': + ref: 'v7.0.1' + commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1' + owner_id: 44036562 + repo_id: 197814629 + 'docker/build-push-action@v7.4.0': + ref: 'v7.4.0' + commit: 'sha1-c3c9e263c25d99ce0380d002d59b67737d91b0dc' + owner_id: 5429470 + repo_id: 241092383 + 'docker/login-action@v4.8.0': + ref: 'v4.8.0' + commit: 'sha1-8aa5831fb8d48d8f76594c7ddde61ae58019f550' + owner_id: 5429470 + repo_id: 287743349 + 'docker/metadata-action@v6.2.0': + ref: 'v6.2.0' + commit: 'sha1-dc802804100637a589fabce1cb79ff13a1411302' + owner_id: 5429470 + repo_id: 306769011 + 'docker/setup-buildx-action@v4.4.1': + ref: 'v4.4.1' + commit: 'sha1-f87e5991a6d7451dcb8d9637bfbc97413f497069' + owner_id: 5429470 + repo_id: 288485773 + 'j178/prek-action@v3.1.0': + ref: 'v3.1.0' + commit: 'sha1-44924fe9ef4a6f88253c4b6b1bf11c689d3ce53d' + owner_id: 10510431 + repo_id: 1052387486 diff --git a/.github/workflows/prek_checks.yml b/.github/workflows/prek_checks.yml index a43b12e..35deb63 100644 --- a/.github/workflows/prek_checks.yml +++ b/.github/workflows/prek_checks.yml @@ -1,3 +1,5 @@ +# Note: +# https://docs.github.com/en/actions/concepts/security/workflow-dependency-lockfiles name: prek checks on: [workflow_call, workflow_dispatch] @@ -39,13 +41,11 @@ jobs: # https://github.com/actions/checkout - name: Checkout repository - # v7.0.1 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + uses: actions/checkout@v7.0.1 # https://github.com/j178/prek-action - name: Install prek - # v3.1.0 - uses: j178/prek-action@44924fe9ef4a6f88253c4b6b1bf11c689d3ce53d + uses: j178/prek-action@v3.1.0 with: install-only: true diff --git a/.github/workflows/trixie-dev.yml b/.github/workflows/trixie-dev.yml index b03ea84..ea2bbf5 100644 --- a/.github/workflows/trixie-dev.yml +++ b/.github/workflows/trixie-dev.yml @@ -1,3 +1,5 @@ +# Note: +# https://docs.github.com/en/actions/concepts/security/workflow-dependency-lockfiles # https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax # https://docs.github.com/en/actions/reference/workflows-and-actions/variables name: 'trixie-dev' @@ -42,8 +44,7 @@ jobs: # https://github.com/docker/login-action - name: Docker login to GitHub Container Registry (GHCR) - # docker/login-action v4.8.0 - uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 + uses: docker/login-action@v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -54,8 +55,7 @@ jobs: id: docker_meta env: DOCKER_METADATA_ANNOTATIONS_LEVELS: index - # docker/metadata-action v6.2.0 - uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 + uses: docker/metadata-action@v6.2.0 with: annotations: | ${{ env.OCI }}.created={{ date 'YYYY-MM-DDTHH:mm:ss.SSS[Z]' }} @@ -79,22 +79,18 @@ jobs: # https://github.com/docker/setup-buildx-action - name: Docker setup Buildx id: docker_buildx - # docker/setup-buildx-action v4.4.1 - uses: >- - docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 + uses: docker/setup-buildx-action@v4.4.1 with: platforms: linux/amd64,linux/arm64 # https://github.com/actions/checkout - name: GitHub checkout repository - # actions/checkout v7.0.1 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + uses: actions/checkout@v7.0.1 # https://github.com/docker/build-push-action - name: Build and push Docker image to GHCR - # build-push-action v7.4.0 - uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc + uses: docker/build-push-action@v7.4.0 with: annotations: ${{ steps.docker_meta.outputs.annotations }} builder: ${{ steps.docker_buildx.outputs.name }} diff --git a/.github/workflows/trixie-msmtp-dev.yml b/.github/workflows/trixie-msmtp-dev.yml index 17a8954..b59bd74 100644 --- a/.github/workflows/trixie-msmtp-dev.yml +++ b/.github/workflows/trixie-msmtp-dev.yml @@ -1,3 +1,5 @@ +# Note: +# https://docs.github.com/en/actions/concepts/security/workflow-dependency-lockfiles # https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax # https://docs.github.com/en/actions/reference/workflows-and-actions/variables name: 'trixie-msmtp-dev' @@ -42,8 +44,7 @@ jobs: # https://github.com/docker/login-action - name: Docker login to GitHub Container Registry (GHCR) - # docker/login-action v4.8.0 - uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 + uses: docker/login-action@v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -55,7 +56,7 @@ jobs: env: DOCKER_METADATA_ANNOTATIONS_LEVELS: index # docker/metadata-action v6.2.0 - uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 + uses: docker/metadata-action@v6.2.0 with: annotations: | ${{ env.OCI }}.created={{ date 'YYYY-MM-DDTHH:mm:ss.SSS[Z]' }} @@ -79,22 +80,18 @@ jobs: # https://github.com/docker/setup-buildx-action - name: Docker setup Buildx id: docker_buildx - # docker/setup-buildx-action v4.4.1 - uses: >- - docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 + uses: docker/setup-buildx-action@v4.4.1 with: platforms: linux/amd64,linux/arm64 # https://github.com/actions/checkout - name: GitHub checkout repository - # actions/checkout v7.0.1 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + uses: actions/checkout@v7.0.1 # https://github.com/docker/build-push-action - name: Build and push Docker image to GHCR - # build-push-action v7.4.0 - uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc + uses: docker/build-push-action@v7.4.0 with: annotations: ${{ steps.docker_meta.outputs.annotations }} builder: ${{ steps.docker_buildx.outputs.name }} diff --git a/.github/workflows/trixie-msmtp.yml b/.github/workflows/trixie-msmtp.yml index d9c7e83..bee4336 100644 --- a/.github/workflows/trixie-msmtp.yml +++ b/.github/workflows/trixie-msmtp.yml @@ -1,3 +1,5 @@ +# Note: +# https://docs.github.com/en/actions/concepts/security/workflow-dependency-lockfiles # https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax # https://docs.github.com/en/actions/reference/workflows-and-actions/variables name: 'trixie-msmtp' @@ -38,8 +40,7 @@ jobs: # https://github.com/docker/login-action - name: Docker login to GitHub Container Registry (GHCR) - # docker/login-action v4.8.0 - uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 + uses: docker/login-action@v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -50,8 +51,7 @@ jobs: id: docker_meta env: DOCKER_METADATA_ANNOTATIONS_LEVELS: index - # docker/metadata-action v6.2.0 - uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 + uses: docker/metadata-action@v6.2.0 with: annotations: | ${{ env.OCI }}.created={{ date 'YYYY-MM-DDTHH:mm:ss.SSS[Z]' }} @@ -76,22 +76,18 @@ jobs: # https://github.com/docker/setup-buildx-action - name: Docker setup Buildx id: docker_buildx - # docker/setup-buildx-action v4.4.1 - uses: >- - docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 + uses: docker/setup-buildx-action@v4.4.1 with: platforms: linux/amd64,linux/arm64 # https://github.com/actions/checkout - name: GitHub checkout repository - # actions/checkout v7.0.1 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + uses: actions/checkout@v7.0.1 # https://github.com/docker/build-push-action - name: Build and push Docker image to GHCR - # build-push-action v7.4.0 - uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc + uses: docker/build-push-action@v7.4.0 with: annotations: ${{ steps.docker_meta.outputs.annotations }} builder: ${{ steps.docker_buildx.outputs.name }} diff --git a/.github/workflows/trixie.yml b/.github/workflows/trixie.yml index a009140..d804a89 100644 --- a/.github/workflows/trixie.yml +++ b/.github/workflows/trixie.yml @@ -1,3 +1,5 @@ +# Note: +# https://docs.github.com/en/actions/concepts/security/workflow-dependency-lockfiles # https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax # https://docs.github.com/en/actions/reference/workflows-and-actions/variables name: 'trixie' @@ -38,8 +40,7 @@ jobs: # https://github.com/docker/login-action - name: Docker login to GitHub Container Registry (GHCR) - # docker/login-action v4.8.0 - uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 + uses: docker/login-action@v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -50,8 +51,7 @@ jobs: id: docker_meta env: DOCKER_METADATA_ANNOTATIONS_LEVELS: index - # docker/metadata-action v6.2.0 - uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 + uses: docker/metadata-action@v6.2.0 with: annotations: | ${{ env.OCI }}.created={{ date 'YYYY-MM-DDTHH:mm:ss.SSS[Z]' }} @@ -76,22 +76,18 @@ jobs: # https://github.com/docker/setup-buildx-action - name: Docker setup Buildx id: docker_buildx - # docker/setup-buildx-action v4.4.1 - uses: >- - docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 + uses: docker/setup-buildx-action@v4.4.1 with: platforms: linux/amd64,linux/arm64 # https://github.com/actions/checkout - name: GitHub checkout repository - # actions/checkout v7.0.1 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + uses: actions/checkout@v7.0.1 # https://github.com/docker/build-push-action - name: Build and push Docker image to GHCR - # build-push-action v7.4.0 - uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc + uses: docker/build-push-action@v7.4.0 with: annotations: ${{ steps.docker_meta.outputs.annotations }} builder: ${{ steps.docker_buildx.outputs.name }} diff --git a/.github/workflows/util-raw-dev.yml b/.github/workflows/util-raw-dev.yml index 58a3bde..ac7af78 100644 --- a/.github/workflows/util-raw-dev.yml +++ b/.github/workflows/util-raw-dev.yml @@ -1,3 +1,5 @@ +# Note: +# https://docs.github.com/en/actions/concepts/security/workflow-dependency-lockfiles # https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax # https://docs.github.com/en/actions/reference/workflows-and-actions/variables name: 'util-raw-dev' @@ -42,8 +44,7 @@ jobs: # https://github.com/docker/login-action - name: Docker login to GitHub Container Registry (GHCR) - # docker/login-action v4.8.0 - uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 + uses: docker/login-action@v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -54,8 +55,7 @@ jobs: id: docker_meta env: DOCKER_METADATA_ANNOTATIONS_LEVELS: index - # docker/metadata-action v6.2.0 - uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 + uses: docker/metadata-action@v6.2.0 with: annotations: | ${{ env.OCI }}.created={{ date 'YYYY-MM-DDTHH:mm:ss.SSS[Z]' }} @@ -79,22 +79,18 @@ jobs: # https://github.com/docker/setup-buildx-action - name: Docker setup Buildx id: docker_buildx - # docker/setup-buildx-action v4.4.1 - uses: >- - docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 + uses: docker/setup-buildx-action@v4.4.1 with: platforms: linux/amd64,linux/arm64 # https://github.com/actions/checkout - name: GitHub checkout repository - # actions/checkout v7.0.1 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + uses: actions/checkout@v7.0.1 # https://github.com/docker/build-push-action - name: Build and push Docker image to GHCR - # build-push-action v7.4.0 - uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc + uses: docker/build-push-action@v7.4.0 with: annotations: ${{ steps.docker_meta.outputs.annotations }} builder: ${{ steps.docker_buildx.outputs.name }} diff --git a/.github/workflows/util-raw.yml b/.github/workflows/util-raw.yml index e78cdab..19f77dd 100644 --- a/.github/workflows/util-raw.yml +++ b/.github/workflows/util-raw.yml @@ -1,3 +1,5 @@ +# Note: +# https://docs.github.com/en/actions/concepts/security/workflow-dependency-lockfiles # https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax # https://docs.github.com/en/actions/reference/workflows-and-actions/variables name: 'util-raw' @@ -38,8 +40,7 @@ jobs: # https://github.com/docker/login-action - name: Docker login to GitHub Container Registry (GHCR) - # docker/login-action v4.8.0 - uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 + uses: docker/login-action@v4.8.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -50,8 +51,7 @@ jobs: id: docker_meta env: DOCKER_METADATA_ANNOTATIONS_LEVELS: index - # docker/metadata-action v6.2.0 - uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 + uses: docker/metadata-action@v6.2.0 with: annotations: | ${{ env.OCI }}.created={{ date 'YYYY-MM-DDTHH:mm:ss.SSS[Z]' }} @@ -76,22 +76,18 @@ jobs: # https://github.com/docker/setup-buildx-action - name: Docker setup Buildx id: docker_buildx - # docker/setup-buildx-action v4.4.1 - uses: >- - docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 + uses: docker/setup-buildx-action@v4.4.1 with: platforms: linux/amd64,linux/arm64 # https://github.com/actions/checkout - name: GitHub checkout repository - # actions/checkout v7.0.1 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + uses: actions/checkout@v7.0.1 # https://github.com/docker/build-push-action - name: Build and push Docker image to GHCR - # build-push-action v7.4.0 - uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc + uses: docker/build-push-action@v7.4.0 with: annotations: ${{ steps.docker_meta.outputs.annotations }} builder: ${{ steps.docker_buildx.outputs.name }} From 27d4177ad6c6873b027f069be4ccde7ffaa6d824 Mon Sep 17 00:00:00 2001 From: Timid Robot Zehta Date: Thu, 19 Nov 2026 22:14:35 +0100 Subject: [PATCH 2/4] update to j178/prek-action@v3.1.1 (from v3.1.0) --- .github/workflows/actions.lock | 8 ++++---- .github/workflows/prek_checks.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock index baa59c2..5b27f7c 100644 --- a/.github/workflows/actions.lock +++ b/.github/workflows/actions.lock @@ -5,7 +5,7 @@ version: 'v0.0.3' workflows: '.github/workflows/prek_checks.yml': - 'actions/checkout@v7.0.1' - - 'j178/prek-action@v3.1.0' + - 'j178/prek-action@v3.1.1' '.github/workflows/trixie-dev.yml': - 'actions/checkout@v7.0.1' - 'docker/build-push-action@v7.4.0' @@ -68,8 +68,8 @@ dependencies: commit: 'sha1-f87e5991a6d7451dcb8d9637bfbc97413f497069' owner_id: 5429470 repo_id: 288485773 - 'j178/prek-action@v3.1.0': - ref: 'v3.1.0' - commit: 'sha1-44924fe9ef4a6f88253c4b6b1bf11c689d3ce53d' + 'j178/prek-action@v3.1.1': + ref: 'v3.1.1' + commit: 'sha1-7b101f8338a08d2bd6fdb3625e4e7692428763a3' owner_id: 10510431 repo_id: 1052387486 diff --git a/.github/workflows/prek_checks.yml b/.github/workflows/prek_checks.yml index 35deb63..379fe84 100644 --- a/.github/workflows/prek_checks.yml +++ b/.github/workflows/prek_checks.yml @@ -45,7 +45,7 @@ jobs: # https://github.com/j178/prek-action - name: Install prek - uses: j178/prek-action@v3.1.0 + uses: j178/prek-action@v3.1.1 with: install-only: true From 13d2b6a669567945d90142d3c38e259f56ce6df2 Mon Sep 17 00:00:00 2001 From: Timid Robot Zehta Date: Thu, 19 Nov 2026 22:20:37 +0100 Subject: [PATCH 3/4] add verify-lockfile workflow --- .github/workflows/actions.lock | 2 ++ .github/workflows/verify-lockfile.yml | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 .github/workflows/verify-lockfile.yml diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock index 5b27f7c..d914205 100644 --- a/.github/workflows/actions.lock +++ b/.github/workflows/actions.lock @@ -42,6 +42,8 @@ workflows: - 'docker/login-action@v4.8.0' - 'docker/metadata-action@v6.2.0' - 'docker/setup-buildx-action@v4.4.1' + '.github/workflows/verify-lockfile.yml': + - 'actions/checkout@v7.0.1' dependencies: 'actions/checkout@v7.0.1': ref: 'v7.0.1' diff --git a/.github/workflows/verify-lockfile.yml b/.github/workflows/verify-lockfile.yml new file mode 100644 index 0000000..c54560d --- /dev/null +++ b/.github/workflows/verify-lockfile.yml @@ -0,0 +1,25 @@ +# Fails when .github/workflows/actions.lock is out of sync with the +# workflows or a locked pin no longer verifies upstream. + +name: verify-lockfile + +on: + pull_request: + push: + branches: + - main + +permissions: + contents: read + +jobs: + verify: + runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ github.token }} + steps: + - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false + - run: gh extension install github/gh-actions-lock --pin v0.4.1 + - run: gh actions-lock --verify From 0a6a60c4ef4ee77b63cb2f42c3c2c99a955117a5 Mon Sep 17 00:00:00 2001 From: Timid Robot Zehta Date: Thu, 19 Nov 2026 22:36:19 +0100 Subject: [PATCH 4/4] add gh-actions-lock to prek and update docs --- .github/workflows/prek_checks.yml | 4 ++++ .github/workflows/verify-lockfile.yml | 25 ------------------------- README.md | 19 +++++++++++++------ prek.toml | 19 +++++++++++++++++++ 4 files changed, 36 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/verify-lockfile.yml diff --git a/.github/workflows/prek_checks.yml b/.github/workflows/prek_checks.yml index 379fe84..5456248 100644 --- a/.github/workflows/prek_checks.yml +++ b/.github/workflows/prek_checks.yml @@ -49,6 +49,10 @@ jobs: with: install-only: true + # https://github.com/github/gh-actions-lock + - name: Install gh-actions-lock + run: gh extension install github/gh-actions-lock --pin v0.4.1 + # The no-commit-to-branch builtin hook is skipped to avoid false # positives (ex. when PRs are merged) diff --git a/.github/workflows/verify-lockfile.yml b/.github/workflows/verify-lockfile.yml deleted file mode 100644 index c54560d..0000000 --- a/.github/workflows/verify-lockfile.yml +++ /dev/null @@ -1,25 +0,0 @@ -# Fails when .github/workflows/actions.lock is out of sync with the -# workflows or a locked pin no longer verifies upstream. - -name: verify-lockfile - -on: - pull_request: - push: - branches: - - main - -permissions: - contents: read - -jobs: - verify: - runs-on: ubuntu-latest - env: - GH_TOKEN: ${{ github.token }} - steps: - - uses: actions/checkout@v7.0.1 - with: - persist-credentials: false - - run: gh extension install github/gh-actions-lock --pin v0.4.1 - - run: gh actions-lock --verify diff --git a/README.md b/README.md index 1f13c12..96c652c 100644 --- a/README.md +++ b/README.md @@ -24,15 +24,22 @@ Local development uses Docker Compose and a suite of static analysis tools. 2. Install addititional dependencies macOS installation example: ```shell - brew install hadolint prek railway rsync shellcheck + brew install gh hadolint prek railway rsync shellcheck ``` - 1. Install hadolint ([Install - hadolint/hadolint][hadolint-install]) - 2. Install prek ([Installation - j178/prek][prek-install]) - 3. Install Railway CLI ([Installing - CLI | Railway Docs][railway-install]) - 4. Install Rsync ([rsync download][rsync-install]) - 5. Install shellcheck ([Installing - + ```shell + gh extension install github/gh-actions-lock + ``` + 1. Install gh ([Installation - github/cli/cli][intall-gh]) + 2. Install gh-actions-lock ([Install - github/gh-actinos-lock][inst-ghal]) + 3. Install hadolint ([Install - hadolint/hadolint][hadolint-install]) + 4. Install prek ([Installation - j178/prek][prek-install]) + 5. Install Railway CLI ([Installing - CLI | Railway Docs][railway-install]) + 6. Install Rsync ([rsync download][rsync-install]) + 7. Install shellcheck ([Installing - koalaman/shellcheck][shellcheck-install]) +[install-gh]: https://github.com/cli/cli#installation +[inst-ghal]: https://github.com/github/gh-actions-lock#install [docker-install]: https://docs.docker.com/get-started/get-docker/ [hadolint-install]: https://github.com/hadolint/hadolint#install [prek-install]: https://github.com/j178/prek#installation diff --git a/prek.toml b/prek.toml index cc07291..49f8843 100644 --- a/prek.toml +++ b/prek.toml @@ -85,4 +85,23 @@ hooks = [ ] +# gh-actions-lock +# https://github.com/github/gh-actions-lock +[[repos]] +repo = "local" +hooks = [ + # Hook option order based on: + # https://prek.j178.dev/reference/configuration/#common-hook-options + { + id = "gh-actions-lock", + name = "gh-actions-lock", + entry = "gh actions-lock --verify-local", + language = "system", + files = { glob = ".github/workflows/*" }, + types = [ "yaml" ], + description = """Ensure every uses: has a lockfile entry (coverage only, \ + not provenance)""", + }, +] + # vim: tabstop=2 shiftwidth=2