From 2a1c6a0a35c6c29cc682f4ac454a2422deb041b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Tue, 24 Nov 2026 14:21:43 +0100 Subject: [PATCH 1/2] chore(ci): lock GitHub Actions via actions.lock Workflows reference actions by version tag; .github/workflows/actions.lock pins each tag, including transitive ones, to the commit that was pinned inline before. The factory review now runs through the apify/actions composite action, which the lockfile can pin, instead of the reusable workflow. --- .github/workflows/actions.lock | 202 ++++++++++++++++++++++++++ .github/workflows/check.yaml | 36 ++--- .github/workflows/docs.yaml | 16 +- .github/workflows/e2e.yaml | 4 +- .github/workflows/factory_review.yaml | 56 ++++--- .github/workflows/issue_labeling.yaml | 2 +- .github/workflows/pr_preview.yaml | 4 +- .github/workflows/pre_release.yaml | 22 +-- .github/workflows/publish_to_npm.yaml | 4 +- .github/workflows/release.yaml | 30 ++-- .github/workflows/version_docs.yaml | 10 +- CLAUDE.md | 4 + 12 files changed, 305 insertions(+), 85 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 000000000..fb8ee5f62 --- /dev/null +++ b/.github/workflows/actions.lock @@ -0,0 +1,202 @@ +# 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/check.yaml': + - 'actions/checkout@v7.0.1' + - 'actions/setup-node@v7.1.0' + - 'actions/setup-python@v7.0.0' + - 'actions/upload-artifact@v7.0.2' + - 'apify/actions@v1.6.2' + - 'oven-sh/setup-bun@v2.2.0' + '.github/workflows/docs.yaml': + - 'actions/checkout@v7.0.1' + - 'actions/configure-pages@v6.0.0' + - 'actions/deploy-pages@v5.0.1' + - 'actions/download-artifact@v8.0.2' + - 'actions/setup-node@v7.1.0' + - 'actions/upload-artifact@v7.0.2' + - 'actions/upload-pages-artifact@v5.0.0' + - 'apify/actions@v1.6.2' + '.github/workflows/e2e.yaml': + - 'actions/checkout@v7.0.1' + - 'actions/setup-node@v7.1.0' + - 'apify/actions@v1.6.2' + '.github/workflows/factory_review.yaml': + - 'apify/actions@v1.9.0' + '.github/workflows/issue_labeling.yaml': + - 'actions/github-script@v9.0.0' + '.github/workflows/pr_preview.yaml': + - 'actions/checkout@v7.0.1' + - 'actions/setup-node@v7.1.0' + - 'apify/actions@v1.6.2' + '.github/workflows/pre_release.yaml': + - 'actions/checkout@v7.0.1' + - 'actions/download-artifact@v8.0.2' + - 'actions/setup-node@v7.1.0' + - 'actions/upload-artifact@v7.0.2' + - 'apify/actions@v1.6.2' + - 'lewagon/wait-on-check-action@v1.9.1' + - 'oven-sh/setup-bun@v2.2.0' + - 'softprops/action-gh-release@v3.0.3' + '.github/workflows/publish_to_npm.yaml': + - 'actions/checkout@v7.0.1' + - 'actions/setup-node@v7.1.0' + - 'apify/actions@v1.6.2' + '.github/workflows/release.yaml': + - 'actions/checkout@v7.0.1' + - 'actions/download-artifact@v8.0.2' + - 'actions/setup-node@v7.1.0' + - 'actions/upload-artifact@v7.0.2' + - 'apify/actions@v1.6.2' + - 'damianreeves/write-file-action@master' + - 'homebrew/actions@2026.09.07.1' + - 'lewagon/wait-on-check-action@v1.9.1' + - 'oven-sh/setup-bun@v2.2.0' + - 'softprops/action-gh-release@v3.0.3' + '.github/workflows/version_docs.yaml': + - 'actions/checkout@v7.0.1' + - 'actions/download-artifact@v8.0.2' + - 'actions/setup-node@v7.1.0' + - 'actions/upload-artifact@v7.0.2' + - 'apify/actions@v1.6.2' +dependencies: + 'actions/cache@v6.1.0': + ref: 'v6.1.0' + commit: 'sha1-55cc8345863c7cc4c66a329aec7e433d2d1c52a9' + owner_id: 44036562 + repo_id: 215566462 + 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1': + ref: 'v7.0.1' + commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1' + owner_id: 44036562 + repo_id: 197814629 + 'actions/checkout@v6': + ref: 'v6' + commit: 'sha1-d23441a48e516b6c34aea4fa41551a30e30af803' + owner_id: 44036562 + repo_id: 197814629 + 'actions/checkout@v7.0.1': + ref: 'v7.0.1' + commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1' + owner_id: 44036562 + repo_id: 197814629 + 'actions/configure-pages@v6.0.0': + ref: 'v6.0.0' + commit: 'sha1-45bfe0192ca1faeb007ade9deae92b16b8254a0d' + owner_id: 44036562 + repo_id: 513659658 + 'actions/deploy-pages@v5.0.1': + ref: 'v5.0.1' + commit: 'sha1-368f82528645a54fb793d4d04e342629a3f51346' + owner_id: 44036562 + repo_id: 438112499 + 'actions/download-artifact@v8.0.2': + ref: 'v8.0.2' + commit: 'sha1-9000827ccba6bdab643e8b6fd33ac0654aef8333' + owner_id: 44036562 + repo_id: 192626254 + 'actions/github-script@v8': + ref: 'v8' + commit: 'sha1-ed597411d8f924073f98dfc5c65a23a2325f34cd' + owner_id: 44036562 + repo_id: 205262760 + 'actions/github-script@v9.0.0': + ref: 'v9.0.0' + commit: 'sha1-3a2844b7e9c422d3c10d287c895573f7108da1b3' + owner_id: 44036562 + repo_id: 205262760 + 'actions/setup-node@v7.1.0': + ref: 'v7.1.0' + commit: 'sha1-949feb2413d6458794dcd2491c4babbbce0c15c1' + owner_id: 44036562 + repo_id: 189476904 + 'actions/setup-python@v7.0.0': + ref: 'v7.0.0' + commit: 'sha1-5fda3b95a4ea91299a34e894583c3862153e4b97' + owner_id: 44036562 + repo_id: 192625525 + 'actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f': + ref: 'v7.0.0' + commit: 'sha1-bbbca2ddaa5d8feaa63e36b76fdaad77386f024f' + owner_id: 44036562 + repo_id: 192625955 + 'actions/upload-artifact@v7': + ref: 'v7' + commit: 'sha1-cf430e030ddbb5b0abf93d22962f4752f3646cd9' + owner_id: 44036562 + repo_id: 192625955 + 'actions/upload-artifact@v7.0.2': + ref: 'v7.0.2' + commit: 'sha1-cf430e030ddbb5b0abf93d22962f4752f3646cd9' + owner_id: 44036562 + repo_id: 192625955 + 'actions/upload-pages-artifact@v5.0.0': + ref: 'v5.0.0' + commit: 'sha1-fc324d3547104276b827a68afc52ff2a11cc49c9' + owner_id: 44036562 + repo_id: 496012378 + uses: + - 'actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f' + 'apify/actions@v1.6.2': + ref: 'v1.6.2' + commit: 'sha1-6a234394aa4b2a753d3ed294c3e069d044656406' + owner_id: 24586296 + repo_id: 1238646352 + uses: + - 'actions/cache@v6.1.0' + - 'actions/checkout@v6' + - 'actions/github-script@v8' + - 'actions/upload-artifact@v7' + - 'pierotofy/set-swap-space@v1.0' + - 'pnpm/action-setup@v6.1.0' + 'apify/actions@v1.9.0': + ref: 'v1.9.0' + commit: 'sha1-994a3e5ec79a5575ac4d81365bab7549c9687c32' + owner_id: 24586296 + repo_id: 1238646352 + uses: + - 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' + 'damianreeves/write-file-action@master': + ref: 'master' + commit: 'sha1-7d5624061f5b9d729a2acb90d4d8ea9f2f6e3ddf' + owner_id: 957246 + repo_id: 258052107 + 'homebrew/actions@2026.09.07.1': + ref: '2026.09.07.1' + commit: 'sha1-f8d4222eb633e65c2a0157383cf80861fc7fae7f' + owner_id: 1503512 + repo_id: 202511568 + 'lewagon/wait-on-check-action@v1.9.1': + ref: 'v1.9.1' + commit: 'sha1-369769072fe522a3a8a85c03c96af1e5242a1994' + owner_id: 5470001 + repo_id: 263061178 + uses: + - 'ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64' + 'oven-sh/setup-bun@v2.2.0': + ref: 'v2.2.0' + commit: 'sha1-0c5077e51419868618aeaa5fe8019c62421857d6' + owner_id: 108928776 + repo_id: 512644635 + 'pierotofy/set-swap-space@v1.0': + ref: 'v1.0' + commit: 'sha1-49819abfb41bd9b44fb781159c033dba90353a7c' + owner_id: 1951843 + repo_id: 379024912 + 'pnpm/action-setup@v6.1.0': + ref: 'v6.1.0' + commit: 'sha1-ea17c68df8912ef543352723c149a84f56e3d413' + owner_id: 21320719 + repo_id: 262289747 + 'ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64': + ref: 'v1.299.0' + commit: 'sha1-3ff19f5e2baf30647122352b96108b1fbe250c64' + owner_id: 210414 + repo_id: 231208785 + 'softprops/action-gh-release@v3.0.3': + ref: 'v3.0.3' + commit: 'sha1-efb35369e0ad2afab669f228072c1b0d510eae64' + owner_id: 2242 + repo_id: 204253808 diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 528970ed4..4a9dae439 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -24,10 +24,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/checkout@v7.0.1 - name: Use Node.js ${{ env.LATEST_NODE_VERSION }} - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + uses: actions/setup-node@v7.1.0 with: node-version: ${{ env.LATEST_NODE_VERSION }} check-latest: true @@ -49,10 +49,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/checkout@v7.0.1 - name: Use Node.js ${{ env.LATEST_NODE_VERSION }} - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + uses: actions/setup-node@v7.1.0 with: node-version: ${{ env.LATEST_NODE_VERSION }} check-latest: true @@ -86,10 +86,10 @@ jobs: run: | echo "::add-mask::${{ secrets.APIFY_TEST_USER_API_TOKEN }}" - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/checkout@v7.0.1 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + uses: actions/setup-node@v7.1.0 with: node-version: ${{ matrix.node-version }} check-latest: true @@ -99,7 +99,7 @@ jobs: - name: Set up Python (Windows) if: ${{ matrix.os == 'windows-2025' }} - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 + uses: actions/setup-python@v7.0.0 with: python-version: 3.14 @@ -120,10 +120,10 @@ jobs: run: | echo "::add-mask::${{ secrets.APIFY_TEST_USER_API_TOKEN }}" - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/checkout@v7.0.1 - name: Use Node.js ${{ env.LATEST_NODE_VERSION }} - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + uses: actions/setup-node@v7.1.0 with: node-version: ${{ env.LATEST_NODE_VERSION }} check-latest: true @@ -156,10 +156,10 @@ jobs: run: | echo "::add-mask::${{ secrets.APIFY_TEST_USER_API_TOKEN }}" - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/checkout@v7.0.1 - name: Use Node.js ${{ env.LATEST_NODE_VERSION }} - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + uses: actions/setup-node@v7.1.0 with: node-version: ${{ env.LATEST_NODE_VERSION }} check-latest: true @@ -168,7 +168,7 @@ jobs: uses: apify/actions/pnpm-install@v1.6.2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 + uses: actions/setup-python@v7.0.0 with: python-version: ${{ matrix.python-version }} @@ -205,10 +205,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/checkout@v7.0.1 - name: Use Node.js ${{ env.LATEST_NODE_VERSION }} - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + uses: actions/setup-node@v7.1.0 with: node-version: ${{ env.LATEST_NODE_VERSION }} check-latest: true @@ -243,10 +243,10 @@ jobs: timeout-minutes: 20 steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/checkout@v7.0.1 - name: Use Node.js ${{ env.LATEST_NODE_VERSION }} - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + uses: actions/setup-node@v7.1.0 with: node-version: ${{ env.LATEST_NODE_VERSION }} check-latest: true @@ -255,7 +255,7 @@ jobs: uses: apify/actions/pnpm-install@v1.6.2 - name: Install bun - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 + uses: oven-sh/setup-bun@v2.2.0 with: bun-version-file: .bun-version no-cache: true @@ -276,7 +276,7 @@ jobs: run: pnpm run insert-cli-metadata && pnpm run build-bundles - name: Upload Bundles - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + uses: actions/upload-artifact@v7.0.2 with: name: apify-cli-bundles-${{ matrix.label }} path: bundles/** diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 1c8a42104..190294b43 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -19,7 +19,7 @@ jobs: sha: ${{ steps.sha.outputs.sha }} steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/checkout@v7.0.1 with: persist-credentials: false @@ -28,7 +28,7 @@ jobs: run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" - name: Use Node.js - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + uses: actions/setup-node@v7.1.0 with: node-version: 26 check-latest: true @@ -47,7 +47,7 @@ jobs: SEGMENT_TOKEN: ${{ secrets.SEGMENT_TOKEN }} - name: Upload the updated package.json and lockfile - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + uses: actions/upload-artifact@v7.0.2 with: name: docs-theme-update path: | @@ -56,7 +56,7 @@ jobs: retention-days: 1 - name: Upload GitHub Pages artifact - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 + uses: actions/upload-pages-artifact@v5.0.0 with: path: ./website/build @@ -73,7 +73,7 @@ jobs: deployment: false steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/checkout@v7.0.1 with: fetch-depth: 0 persist-credentials: false @@ -85,7 +85,7 @@ jobs: BUILT_SHA: ${{ needs.build.outputs.sha }} - name: Download the updated package.json and lockfile - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + uses: actions/download-artifact@v8.0.2 with: name: docs-theme-update @@ -111,10 +111,10 @@ jobs: steps: - name: Set up GitHub Pages - uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 + uses: actions/configure-pages@v6.0.0 - name: Deploy artifact to GitHub Pages - uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1 + uses: actions/deploy-pages@v5.0.1 - name: Invalidate CloudFront cache run: | diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 55e66d1db..11d34c757 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -43,10 +43,10 @@ jobs: run: | echo "::add-mask::${{ secrets.APIFY_TEST_USER_API_TOKEN }}" - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/checkout@v7.0.1 - name: Use Node.js 24 - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + uses: actions/setup-node@v7.1.0 with: node-version: 26 check-latest: true diff --git a/.github/workflows/factory_review.yaml b/.github/workflows/factory_review.yaml index 8352b9907..9028c73bd 100644 --- a/.github/workflows/factory_review.yaml +++ b/.github/workflows/factory_review.yaml @@ -1,7 +1,7 @@ name: apify-factory review (AI review, and auto-approval) # Calls the apify-factory review and auto-approval pipeline (apify/ai-developer, wired up in -# apify/workflows). A pull request is reviewed when apify-factory is requested; with the +# apify/actions). A pull request is reviewed when apify-factory is requested; with the # repository's `factory_auto_review` custom property set to true, also every ready pull request when # it opens and after every push that changes its content. Approvals additionally need the # repository's `factory_auto_approve` custom property set to true. @@ -40,23 +40,37 @@ concurrency: jobs: factory-review: - uses: apify/workflows/.github/workflows/factory_review.yaml@0a1eaf3d3b67be2e8c15b2fc989168721809c8e2 # v1.4.1 - # The three secrets the pipeline declares, instead of every secret this repository can read. - secrets: - APIFY_FACTORY_GITHUB_TOKEN: ${{ secrets.APIFY_FACTORY_GITHUB_TOKEN }} - ANTHROPIC_API_KEY_APIFY_FACTORY_REVIEW: ${{ secrets.ANTHROPIC_API_KEY_APIFY_FACTORY_REVIEW }} - APIFY_FACTORY_CALLBACK_TOKEN: ${{ secrets.APIFY_FACTORY_CALLBACK_TOKEN }} - # 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": [ - "src/lib/credentials.ts", - "src/lib/auth-file.ts", - "src/lib/oauth/**", - "scripts/install/**", - "skills/**", - "patches/**" - ] - } + runs-on: ubuntu-latest + timeout-minutes: 60 + permissions: + contents: read + pull-requests: write + # Proves to the core Actor that this run hands a review to a sandbox. + id-token: write + # Never cancel a running review: the action posts nothing from a cancelled run, which would leave + # the request pending with no review. GitHub keeps one waiting run per group and replaces it with + # a newer one. The group differs from the workflow's own, which would otherwise wait on this job. + 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": [ + "src/lib/credentials.ts", + "src/lib/auth-file.ts", + "src/lib/oauth/**", + "scripts/install/**", + "skills/**", + "patches/**" + ] + } diff --git a/.github/workflows/issue_labeling.yaml b/.github/workflows/issue_labeling.yaml index c26f8e066..fc812b8c4 100644 --- a/.github/workflows/issue_labeling.yaml +++ b/.github/workflows/issue_labeling.yaml @@ -14,7 +14,7 @@ jobs: steps: # Add the "t-builders" label to all new issues - - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + - uses: actions/github-script@v9.0.0 with: script: | github.rest.issues.addLabels({ diff --git a/.github/workflows/pr_preview.yaml b/.github/workflows/pr_preview.yaml index 7690c87b9..081dc61c2 100644 --- a/.github/workflows/pr_preview.yaml +++ b/.github/workflows/pr_preview.yaml @@ -26,10 +26,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/checkout@v7.0.1 - name: Use Node.js ${{ env.LATEST_NODE_VERSION }} - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + uses: actions/setup-node@v7.1.0 with: node-version: ${{ env.LATEST_NODE_VERSION }} check-latest: true diff --git a/.github/workflows/pre_release.yaml b/.github/workflows/pre_release.yaml index 7911780f0..8c8f2c473 100644 --- a/.github/workflows/pre_release.yaml +++ b/.github/workflows/pre_release.yaml @@ -33,7 +33,7 @@ jobs: name: Wait for code checks to pass runs-on: ubuntu-latest steps: - - uses: lewagon/wait-on-check-action@369769072fe522a3a8a85c03c96af1e5242a1994 # v1.9.1 + - uses: lewagon/wait-on-check-action@v1.9.1 with: ref: ${{ github.sha }} repo-token: ${{ secrets.GITHUB_TOKEN }} @@ -53,12 +53,12 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 with: token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} - name: Use Node.js - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + uses: actions/setup-node@v7.1.0 with: node-version: 26 check-latest: true @@ -109,13 +109,13 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 with: ref: ${{ needs.update_changelog.outputs.changelog_commitish }} fetch-depth: 0 - name: Use Node.js - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + uses: actions/setup-node@v7.1.0 with: node-version: 26 check-latest: true @@ -125,7 +125,7 @@ jobs: uses: apify/actions/pnpm-install@v1.6.2 - name: Install bun - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 + uses: oven-sh/setup-bun@v2.2.0 with: bun-version-file: .bun-version @@ -148,7 +148,7 @@ jobs: run: pnpm run insert-cli-metadata && pnpm run build-bundles - name: Upload bundles - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + uses: actions/upload-artifact@v7.0.2 with: name: apify-cli-bundles-${{ matrix.label }} path: bundles/** @@ -163,13 +163,13 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 with: ref: ${{ needs.update_changelog.outputs.changelog_commitish }} # This step also deals with unzipping the archive from GitHub, so we get a big folder with all the bundles! - name: Download bundles - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + uses: actions/download-artifact@v8.0.2 with: pattern: apify-cli-bundles-* merge-multiple: true @@ -180,7 +180,7 @@ jobs: ls -la bundles - name: Use Node.js - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + uses: actions/setup-node@v7.1.0 with: node-version: 26 check-latest: true @@ -196,7 +196,7 @@ jobs: run: node scripts/report-install-size.mjs - name: Create release - uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3 + uses: softprops/action-gh-release@v3.0.3 with: tag_name: v${{ needs.update_changelog.outputs.pre_release_version }} name: ${{ needs.update_changelog.outputs.pre_release_version }} diff --git a/.github/workflows/publish_to_npm.yaml b/.github/workflows/publish_to_npm.yaml index 847135ad4..d9de75a8a 100644 --- a/.github/workflows/publish_to_npm.yaml +++ b/.github/workflows/publish_to_npm.yaml @@ -25,12 +25,12 @@ jobs: name: Publish to NPM runs-on: ubuntu-latest steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/checkout@v7.0.1 with: ref: ${{ inputs.ref }} - name: Use Node.js - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + uses: actions/setup-node@v7.1.0 with: node-version: 26 check-latest: true diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 849514b83..07377e76f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -51,7 +51,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 - name: Check if the head commit contains [skip ci] id: check_skip run: | @@ -61,7 +61,7 @@ jobs: echo 'skipped=false' >> $GITHUB_OUTPUT fi - - uses: lewagon/wait-on-check-action@369769072fe522a3a8a85c03c96af1e5242a1994 # v1.9.1 + - uses: lewagon/wait-on-check-action@v1.9.1 if: ${{ steps.check_skip.outputs.skipped == 'false' }} with: ref: ${{ github.sha }} @@ -81,12 +81,12 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 with: token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} - name: Use Node.js - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + uses: actions/setup-node@v7.1.0 with: node-version: 26 check-latest: true @@ -101,7 +101,7 @@ jobs: run: pnpm pack - name: Update CHANGELOG.md - uses: DamianReeves/write-file-action@7d5624061f5b9d729a2acb90d4d8ea9f2f6e3ddf # master + uses: DamianReeves/write-file-action@master with: path: CHANGELOG.md write-mode: overwrite @@ -144,13 +144,13 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 with: ref: ${{ needs.update_changelog.outputs.changelog_commitish }} fetch-depth: 0 - name: Use Node.js - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + uses: actions/setup-node@v7.1.0 with: node-version: 26 check-latest: true @@ -160,7 +160,7 @@ jobs: uses: apify/actions/pnpm-install@v1.6.2 - name: Install bun - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 + uses: oven-sh/setup-bun@v2.2.0 with: bun-version-file: .bun-version @@ -183,7 +183,7 @@ jobs: run: pnpm run insert-cli-metadata && pnpm run build-bundles - name: Upload bundles - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + uses: actions/upload-artifact@v7.0.2 with: name: apify-cli-bundles-${{ matrix.label }} path: bundles/** @@ -198,13 +198,13 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 with: ref: ${{ needs.update_changelog.outputs.changelog_commitish }} # This step also deals with unzipping the archive from GitHub, so we get a big folder with all the bundles! - name: Download bundles - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + uses: actions/download-artifact@v8.0.2 with: pattern: apify-cli-bundles-* merge-multiple: true @@ -215,7 +215,7 @@ jobs: ls -la bundles - name: Use Node.js - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + uses: actions/setup-node@v7.1.0 with: node-version: 26 check-latest: true @@ -228,7 +228,7 @@ jobs: run: node scripts/report-install-size.mjs - name: Create release - uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3 + uses: softprops/action-gh-release@v3.0.3 with: tag_name: ${{ needs.release_metadata.outputs.tag_name }} name: ${{ needs.release_metadata.outputs.version_number }} @@ -270,7 +270,7 @@ jobs: deployment: false steps: - name: Checkout repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 with: ref: ${{ needs.update_changelog.outputs.changelog_commitish }} @@ -280,7 +280,7 @@ jobs: git config --global user.email 'apify-service-account@users.noreply.github.com' - name: Set up Homebrew - uses: Homebrew/actions/setup-homebrew@f8d4222eb633e65c2a0157383cf80861fc7fae7f # master + uses: Homebrew/actions/setup-homebrew@2026.09.07.1 # It can happen that the updated package version is not available right after the `npm publish` command finishes # Try waiting 3 minutes until the updated package version is available diff --git a/.github/workflows/version_docs.yaml b/.github/workflows/version_docs.yaml index 2d2822744..2d850c752 100644 --- a/.github/workflows/version_docs.yaml +++ b/.github/workflows/version_docs.yaml @@ -18,7 +18,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 with: ref: ${{ github.event.repository.default_branch }} persist-credentials: false @@ -28,7 +28,7 @@ jobs: run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" - name: Use Node.js - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + uses: actions/setup-node@v7.1.0 with: node-version: 26 check-latest: true @@ -48,7 +48,7 @@ jobs: pnpm --filter apify-cli-website exec -- docusaurus docs:version $MAJOR_MINOR - name: Upload the version snapshot - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + uses: actions/upload-artifact@v7.0.2 with: name: versioned-docs path: | @@ -69,7 +69,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 with: ref: ${{ github.event.repository.default_branch }} fetch-depth: 0 @@ -85,7 +85,7 @@ jobs: run: rm -rf website/versioned_docs website/versioned_sidebars website/versions.json - name: Download the version snapshot - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + uses: actions/download-artifact@v8.0.2 with: name: versioned-docs path: website diff --git a/CLAUDE.md b/CLAUDE.md index c5d2c0c6b..e8be17ba8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -37,6 +37,10 @@ The CLI is installed globally by many users and in Actors, so keep the npm insta - API tests must include `[api]` in the test name and live in `test/api/`. - Always `import process from 'node:process'` in command/lib code — never use `globalThis.process`. This is required for test cwd mocks to work. +## 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. + ## Pull requests Keep PR descriptions concise: what changed and why, key numbers, follow-ups. Short bullet points over narration; don't restate the diff or describe the process. From 4c1514d7c8a7ed7a90d55ec0b6842b567723f61b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ad=C3=A1mek?= Date: Tue, 24 Nov 2026 14:30:22 +0100 Subject: [PATCH 2/2] docs: describe the GitHub Actions lockfile in the contributing guide --- CONTRIBUTING.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1f1165157..9a08da6b9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -222,6 +222,10 @@ Use `testRunCommand` from the command framework to invoke CLI commands in tests Open PRs against `master`. Code owners are configured in [`.github/CODEOWNERS`](./.github/CODEOWNERS) and will be requested automatically. +## 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. + ## Releases Releases are fully automated via GitHub Actions — **do not bump the version in `package.json` manually**.