diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock new file mode 100644 index 0000000..d914205 --- /dev/null +++ b/.github/workflows/actions.lock @@ -0,0 +1,77 @@ +# 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.1' + '.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' + '.github/workflows/verify-lockfile.yml': + - 'actions/checkout@v7.0.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.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 a43b12e..5456248 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,16 +41,18 @@ 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.1 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/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 }} 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