From 4f40dcf91d11347d9f7226b31c64f9871659000a Mon Sep 17 00:00:00 2001 From: Jan Buchar Date: Tue, 24 Nov 2026 11:41:48 +0100 Subject: [PATCH] chore(ci): lock GitHub Actions via actions.lock --- .github/workflows/actions.lock | 54 +++++++++++++++++++++++++++ .github/workflows/factory_review.yaml | 33 ++++++++++------ .github/workflows/publish.yml | 8 ++-- .github/workflows/publish_to_pypi.yml | 8 ++-- CONTRIBUTING.md | 4 ++ 5 files changed, 88 insertions(+), 19 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..0461cd6 --- /dev/null +++ b/.github/workflows/actions.lock @@ -0,0 +1,54 @@ +# 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/factory_review.yaml': + - 'apify/actions@v1.9.0' + '.github/workflows/publish.yml': + - 'actions/checkout@v4.4.0' + - 'actions/setup-node@v4.4.0' + '.github/workflows/publish_to_pypi.yml': + - 'actions/checkout@v4.4.0' + - 'actions/setup-python@v5.6.0' + - 'pypa/gh-action-pypi-publish@release/v1' +dependencies: + 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1': + ref: 'v7.0.1' + commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1' + owner_id: 44036562 + repo_id: 197814629 + 'actions/checkout@v4.4.0': + ref: 'v4.4.0' + commit: 'sha1-11d5960a326750d5838078e36cf38b85af677262' + owner_id: 44036562 + repo_id: 197814629 + 'actions/setup-node@v4.4.0': + ref: 'v4.4.0' + commit: 'sha1-49933ea5288caeca8642d1e84afbd3f7d6820020' + owner_id: 44036562 + repo_id: 189476904 + 'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405': + ref: 'v6.2.0' + commit: 'sha1-a309ff8b426b58ec0e2a45f0f869d46889d02405' + owner_id: 44036562 + repo_id: 192625525 + 'actions/setup-python@v5.6.0': + ref: 'v5.6.0' + commit: 'sha1-a26af69be951a213d495a4c3e4e4022e16d87065' + owner_id: 44036562 + repo_id: 192625525 + 'apify/actions@v1.9.0': + ref: 'v1.9.0' + commit: 'sha1-994a3e5ec79a5575ac4d81365bab7549c9687c32' + owner_id: 24586296 + repo_id: 1238646352 + uses: + - 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' + 'pypa/gh-action-pypi-publish@release/v1': + ref: 'release/v1' + commit: 'sha1-7245906fb61fa33a13554f9d5fb856fe61758086' + owner_id: 647025 + repo_id: 178055147 + uses: + - 'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405' diff --git a/.github/workflows/factory_review.yaml b/.github/workflows/factory_review.yaml index c343b43..f184e6f 100644 --- a/.github/workflows/factory_review.yaml +++ b/.github/workflows/factory_review.yaml @@ -20,14 +20,25 @@ permissions: jobs: factory-review: - uses: apify/workflows/.github/workflows/factory_review.yaml@main - secrets: inherit - # Paths never auto-approved here, on top of the pipeline's defaults. Proposed from the - # repository's layout when this workflow was added; edit them like any other code. - with: - policy: | - { - "denyGlobs": [ - "**/pyproject.toml" - ] - } + runs-on: ubuntu-latest + timeout-minutes: 60 + # Never cancel a running review: the action posts nothing from a cancelled run. + concurrency: + group: factory-review-job-${{ github.event.pull_request.number }} + cancel-in-progress: false + steps: + - name: apify-factory review + uses: apify/actions/factory-review@v1.9.0 + with: + apify-factory-github-token: ${{ secrets.APIFY_FACTORY_GITHUB_TOKEN }} + anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY_APIFY_FACTORY_REVIEW }} + apify-factory-callback-token: ${{ secrets.APIFY_FACTORY_CALLBACK_TOKEN }} + factory-public-url: ${{ vars.FACTORY_PUBLIC_URL }} + # Paths never auto-approved here, on top of the pipeline's defaults. Proposed from the + # repository's layout when this workflow was added; edit them like any other code. + policy: | + { + "denyGlobs": [ + "**/pyproject.toml" + ] + } diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1efa2fa..f135d33 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -43,9 +43,9 @@ jobs: echo "Publish to npm must be started on master, got ${GITHUB_REF}" >&2 exit 1 - - uses: actions/checkout@v4 + - uses: actions/checkout@v4.4.0 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v4.4.0 with: node-version: 24 @@ -114,11 +114,11 @@ jobs: VERSION: ${{ needs.check.outputs.version }} TAG: v${{ needs.check.outputs.version }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4.4.0 with: fetch-depth: 0 # full history and tags, so the release notes start at the previous v* tag - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v4.4.0 with: node-version: 24 registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/publish_to_pypi.yml b/.github/workflows/publish_to_pypi.yml index 9305094..d20fedb 100644 --- a/.github/workflows/publish_to_pypi.yml +++ b/.github/workflows/publish_to_pypi.yml @@ -42,9 +42,9 @@ jobs: echo "Publish to PyPI must be started on master, got ${GITHUB_REF}" >&2 exit 1 - - uses: actions/checkout@v4 + - uses: actions/checkout@v4.4.0 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v5.6.0 with: python-version: '3.11' @@ -111,11 +111,11 @@ jobs: VERSION: ${{ needs.check.outputs.version }} TAG: py-v${{ needs.check.outputs.version }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4.4.0 with: fetch-depth: 0 # full history and tags, so the release notes start at the previous py-v* tag - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v5.6.0 with: python-version: '3.11' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a5d8b5f..dfb8bf1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -57,3 +57,7 @@ The workflow refuses to run on any other branch, if the two version strings disa version is already on PyPI or its `py-vX.Y.Z` tag already exists. It then installs the package, smoke tests the CLI and the served debugger UI, builds sdist+wheel, uploads them, and finally **pushes the `py-vX.Y.Z` tag and creates the GitHub release** with generated notes. + +## GitHub Actions + +Workflows reference actions by version tag (`actions/checkout@v7.0.1`), never by commit SHA. [`.github/workflows/actions.lock`](.github/workflows/actions.lock) pins every tag, including those called by composite actions, to its commit. After adding or changing a `uses:` line, run `gh actions-lock` ([extension](https://github.com/github/gh-actions-lock)) and commit the lockfile. Prefer composite actions from `apify/actions` over reusable workflows from `apify/workflows`, which the lockfile can't pin.