diff --git a/.github/actions/push-oci-artifact/action.yml b/.github/actions/push-oci-artifact/action.yml index 3af8c84c..555846e4 100644 --- a/.github/actions/push-oci-artifact/action.yml +++ b/.github/actions/push-oci-artifact/action.yml @@ -25,7 +25,7 @@ runs: steps: - name: Set up ORAS - uses: oras-project/setup-oras@38de303aac69abb66f3e6255b7198bff35f323e3 # v2.0.0 + uses: oras-project/setup-oras@v2.0.0 - name: Validate publish mode shell: bash diff --git a/.github/actions/upload-bundle-artifacts/action.yml b/.github/actions/upload-bundle-artifacts/action.yml index 0db123bb..714a76ba 100644 --- a/.github/actions/upload-bundle-artifacts/action.yml +++ b/.github/actions/upload-bundle-artifacts/action.yml @@ -22,7 +22,7 @@ runs: steps: - name: Configure AWS - uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a + uses: aws-actions/configure-aws-credentials@v4.3.1 with: role-to-assume: ${{ inputs.aws_role_arn }} aws-region: ${{ inputs.aws_region }} diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock new file mode 100644 index 00000000..6079ed7d --- /dev/null +++ b/.github/workflows/actions.lock @@ -0,0 +1,143 @@ +# 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/cd.yml': + - 'actions/cache@v4.3.0' + - 'actions/checkout@v4.3.0' + - 'actions/download-artifact@v4.1.8' + - 'actions/github-script@v7.1.0' + - 'actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065' + - 'actions/upload-artifact@v4.6.2' + - 'aws-actions/configure-aws-credentials@v4.3.1' + - 'docker/login-action@v3.6.0' + - 'docker/setup-buildx-action@v3.11.1' + - 'oras-project/setup-oras@v2.0.0' + - 'pypa/gh-action-pypi-publish@v1.13.0' + - 'slackapi/slack-github-action@v2.1.1' + '.github/workflows/ci.yml': + - 'actions/cache@v4.3.0' + - 'actions/checkout@v4.3.0' + - 'actions/download-artifact@v4.1.8' + - 'actions/setup-java@v4.7.1' + - 'actions/setup-python@v5.6.0' + - 'actions/upload-artifact@v4.6.2' + - 'codecov/codecov-action@v5.5.5' + - 'codecov/test-results-action@v1.1.1' + - 'gitleaks/gitleaks-action@v2.3.9' + - 'pypa/gh-action-pip-audit@f1c3022531130da3984dbdfb2786f6e1cba15556' + - 'qltysh/qlty-action@6bfd5815fe4171d7a566362f24d75e8454909d2a' + '.github/workflows/clean-up-review-app-deployment.yml': [] + '.github/workflows/verify-actions-lock.yml': + - 'actions/checkout@v6.1.0' +dependencies: + 'actions/cache@v4.3.0': + ref: 'v4.3.0' + commit: 'sha1-0057852bfaa89a56745cba8c7296529d2fc39830' + owner_id: 44036562 + repo_id: 215566462 + 'actions/checkout@v4.3.0': + ref: 'v4.3.0' + commit: 'sha1-08eba0b27e820071cde6df949e0beb9ba4906955' + owner_id: 44036562 + repo_id: 197814629 + 'actions/checkout@v6.1.0': + ref: 'v6.1.0' + commit: 'sha1-d23441a48e516b6c34aea4fa41551a30e30af803' + owner_id: 44036562 + repo_id: 197814629 + 'actions/download-artifact@v4.1.8': + ref: 'v4.1.8' + commit: 'sha1-fa0a91b85d4f404e444e00e005971372dc801d16' + owner_id: 44036562 + repo_id: 192626254 + 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea': + ref: 'v7.0.1' + commit: 'sha1-60a0d83039c74a4aee543508d2ffcb1c3799cdea' + owner_id: 44036562 + repo_id: 205262760 + 'actions/github-script@v7.1.0': + ref: 'v7.1.0' + commit: 'sha1-f28e40c7f34bde8b3046d885e986cb6290c5673b' + owner_id: 44036562 + repo_id: 205262760 + 'actions/setup-java@v4.7.1': + ref: 'v4.7.1' + commit: 'sha1-c5195efecf7bdfc987ee8bae7a71cb8b11521c00' + owner_id: 44036562 + repo_id: 196057608 + 'actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065': + ref: 'v5.6.0' + commit: 'sha1-a26af69be951a213d495a4c3e4e4022e16d87065' + 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 + 'actions/upload-artifact@v4.6.2': + ref: 'v4.6.2' + commit: 'sha1-ea165f8d65b6e75b540449e92b4886f43607fa02' + owner_id: 44036562 + repo_id: 192625955 + 'aws-actions/configure-aws-credentials@v4.3.1': + ref: 'v4.3.1' + commit: 'sha1-7474bc4690e29a8392af63c5b98e7449536d5c3a' + owner_id: 57468012 + repo_id: 220391287 + 'codecov/codecov-action@v5.5.5': + ref: 'v5.5.5' + commit: 'sha1-0fb7174895f61a3b6b78fc075e0cd60383518dac' + owner_id: 8226205 + repo_id: 200299178 + uses: + - 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea' + 'codecov/test-results-action@v1.1.1': + ref: 'v1.1.1' + commit: 'sha1-47f89e9acb64b76debcd5ea40642d25a4adced9f' + owner_id: 8226205 + repo_id: 761956558 + 'docker/login-action@v3.6.0': + ref: 'v3.6.0' + commit: 'sha1-5e57cd118135c172c3672efd75eb46360885c0ef' + owner_id: 5429470 + repo_id: 287743349 + 'docker/setup-buildx-action@v3.11.1': + ref: 'v3.11.1' + commit: 'sha1-e468171a9de216ec08956ac3ada2f0791b6bd435' + owner_id: 5429470 + repo_id: 288485773 + 'gitleaks/gitleaks-action@v2.3.9': + ref: 'v2.3.9' + commit: 'sha1-ff98106e4c7b2bc287b24eaf42907196329070c7' + owner_id: 90395851 + repo_id: 242854909 + 'oras-project/setup-oras@v2.0.0': + ref: 'v2.0.0' + commit: 'sha1-38de303aac69abb66f3e6255b7198bff35f323e3' + owner_id: 81890686 + repo_id: 590286646 + 'pypa/gh-action-pip-audit@f1c3022531130da3984dbdfb2786f6e1cba15556': + ref: 'main' + commit: 'sha1-f1c3022531130da3984dbdfb2786f6e1cba15556' + owner_id: 647025 + repo_id: 503119119 + 'pypa/gh-action-pypi-publish@v1.13.0': + ref: 'v1.13.0' + commit: 'sha1-ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e' + owner_id: 647025 + repo_id: 178055147 + uses: + - 'actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065' + 'qltysh/qlty-action@6bfd5815fe4171d7a566362f24d75e8454909d2a': + ref: 'main' + commit: 'sha1-6bfd5815fe4171d7a566362f24d75e8454909d2a' + owner_id: 184769278 + repo_id: 873940193 + 'slackapi/slack-github-action@v2.1.1': + ref: 'v2.1.1' + commit: 'sha1-91efab103c0de0a537f72a35f6b8cda0ee76bf0a' + owner_id: 6962987 + repo_id: 306439799 diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 624afa77..3d56d5f1 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -55,22 +55,22 @@ jobs: contents: read steps: - name: Checkout code - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + uses: actions/checkout@v4.3.0 with: persist-credentials: false - name: Set up Docker Buildx - uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3 + uses: docker/setup-buildx-action@v3.11.1 - name: Login to Docker Hub - uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3 + uses: docker/login-action@v3.6.0 with: username: deepnotebot password: ${{ secrets.DOCKERHUB_PASS }} - name: Export version id: version - uses: ./.github/actions/export-version + uses: $/.github/actions/export-version - name: Validate tag format if: startsWith(github.ref, 'refs/tags/') @@ -87,7 +87,7 @@ jobs: echo "✓ Tag format is valid" - name: Cache pip and poetry - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 + uses: actions/cache@v4.3.0 with: path: | ~/.cache/pip/http @@ -122,7 +122,7 @@ jobs: # STAGING UPLOAD - name: Upload to staging - uses: ./.github/actions/upload-bundle-artifacts + uses: $/.github/actions/upload-bundle-artifacts with: python_version: ${{ matrix.python_version }} toolkit_version: ${{ steps.version.outputs.VERSION }} @@ -132,7 +132,7 @@ jobs: # PRODUCTION UPLOADS (only on tags) - name: Upload to production (versioned) if: startsWith(github.ref, 'refs/tags/') - uses: ./.github/actions/upload-bundle-artifacts + uses: $/.github/actions/upload-bundle-artifacts with: python_version: ${{ matrix.python_version }} toolkit_version: ${{ steps.version.outputs.VERSION }} @@ -141,7 +141,7 @@ jobs: - name: Upload to production (latest) if: startsWith(github.ref, 'refs/tags/') - uses: ./.github/actions/upload-bundle-artifacts + uses: $/.github/actions/upload-bundle-artifacts with: python_version: ${{ matrix.python_version }} toolkit_version: latest @@ -150,7 +150,7 @@ jobs: # OCI ARTIFACT UPLOADS - name: Push toolkit bundle OCI zstd artifact - uses: ./.github/actions/push-oci-artifact + uses: $/.github/actions/push-oci-artifact with: artifact_ref: docker.io/deepnote/toolkit-bundle:${{ steps.version.outputs.VERSION }}-python${{ matrix.python_version }}-tar-zst artifact_type: application/vnd.deepnote.toolkit.bundle.v1 @@ -163,7 +163,7 @@ jobs: - name: Push toolkit installer OCI artifact if: matrix.python_version == '3.10' - uses: ./.github/actions/push-oci-artifact + uses: $/.github/actions/push-oci-artifact with: artifact_ref: docker.io/deepnote/toolkit-installer:${{ steps.version.outputs.VERSION }} artifact_type: application/vnd.deepnote.toolkit.installer.v1 @@ -171,7 +171,7 @@ jobs: toolkit_version: ${{ steps.version.outputs.VERSION }} - name: Upload toolkit bundle artifact - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@v4.6.2 with: name: toolkit-bundle-${{ steps.version.outputs.VERSION }}-python${{ matrix.python_version }} path: dist/python${{ matrix.python_version }}.tar @@ -179,7 +179,7 @@ jobs: retention-days: 1 - name: Upload toolkit constraints artifact - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@v4.6.2 with: name: toolkit-constraints-${{ steps.version.outputs.VERSION }}-python${{ matrix.python_version }} path: dist/constraints${{ matrix.python_version }}.txt @@ -199,22 +199,22 @@ jobs: PYTHON_VERSIONS: ${{ needs.define-toolkit-python-versions.outputs.python_versions }} steps: - name: Checkout code - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + uses: actions/checkout@v4.3.0 with: persist-credentials: false - name: Login to Docker Hub - uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3 + uses: docker/login-action@v3.6.0 with: username: deepnotebot password: ${{ secrets.DOCKERHUB_PASS }} - name: Export version id: version - uses: ./.github/actions/export-version + uses: $/.github/actions/export-version - name: Download toolkit bundle artifacts - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4 + uses: actions/download-artifact@v4.1.8 with: pattern: toolkit-bundle-${{ steps.version.outputs.VERSION }}-python* path: dist/ @@ -252,7 +252,7 @@ jobs: } >> "${GITHUB_OUTPUT}" - name: Push full toolkit bundle OCI artifact - uses: ./.github/actions/push-oci-artifact + uses: $/.github/actions/push-oci-artifact with: artifact_ref: docker.io/deepnote/toolkit-bundle:${{ steps.version.outputs.VERSION }}-full artifact_type: application/vnd.deepnote.toolkit.bundle.v1 @@ -270,22 +270,22 @@ jobs: contents: read steps: - name: Checkout code - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + uses: actions/checkout@v4.3.0 with: persist-credentials: false - name: Login to Docker Hub - uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3 + uses: docker/login-action@v3.6.0 with: username: deepnotebot password: ${{ secrets.DOCKERHUB_PASS }} - name: Export version id: version - uses: ./.github/actions/export-version + uses: $/.github/actions/export-version - name: Download toolkit constraints artifacts - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4 + uses: actions/download-artifact@v4.1.8 with: pattern: toolkit-constraints-${{ steps.version.outputs.VERSION }}-python* path: dist/ @@ -314,7 +314,7 @@ jobs: } >> "${GITHUB_OUTPUT}" - name: Push toolkit constraints OCI artifact - uses: ./.github/actions/push-oci-artifact + uses: $/.github/actions/push-oci-artifact with: artifact_ref: docker.io/deepnote/toolkit-constraints:${{ steps.version.outputs.VERSION }} artifact_type: application/vnd.deepnote.toolkit.constraints.v1 @@ -363,7 +363,7 @@ jobs: id-token: write pull-requests: write steps: - - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + - uses: actions/checkout@v4.3.0 with: fetch-depth: 0 fetch-tags: true @@ -376,7 +376,7 @@ jobs: - name: Load cached Poetry installation id: cached-poetry - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 + uses: actions/cache@v4.3.0 with: path: ~/.local key: ${{ github.event.pull_request.head.repo.full_name || github.repository }}-poetry-${{ runner.os }}-${{ runner.arch }}-py${{ steps.setup-python.outputs.python-version }}-poetry${{ env.POETRY_VERSION }} @@ -390,10 +390,10 @@ jobs: - name: Build wheel package id: build - uses: ./.github/actions/build-wheel + uses: $/.github/actions/build-wheel - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4 + uses: aws-actions/configure-aws-credentials@v4.3.1 with: role-to-assume: ${{ secrets.AWS_STAGING_ROLE_ARN }} role-session-name: github-actions-session @@ -438,7 +438,7 @@ jobs: - name: PR comment if: github.event_name == 'pull_request' - uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7 + uses: actions/github-script@v7.1.0 env: PKG_VERSION: ${{ steps.build.outputs.version }} PKG_WHEEL: ${{ steps.build.outputs.wheel-name }} @@ -482,7 +482,7 @@ jobs: }); } - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + - uses: actions/upload-artifact@v4.6.2 if: always() with: name: python-package-${{ steps.build.outputs.version || 'unknown' }} @@ -502,13 +502,13 @@ jobs: url: https://pypi.org/project/deepnote-toolkit/ steps: - name: Download artifact - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4 + uses: actions/download-artifact@v4.1.8 with: name: python-package-${{ needs.publish-python-package.outputs.version }} path: dist/ - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 + uses: pypa/gh-action-pypi-publish@v1.13.0 with: verbose: false @@ -520,13 +520,13 @@ jobs: if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' steps: - name: Checkout code - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + uses: actions/checkout@v4.3.0 with: persist-credentials: false - name: Export version id: version - uses: ./.github/actions/export-version + uses: $/.github/actions/export-version - name: Trigger GitHub Action for review app config env: @@ -568,25 +568,25 @@ jobs: contents: read steps: - name: Checkout code - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + uses: actions/checkout@v4.3.0 with: persist-credentials: false - name: Set up Docker Buildx - uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3 + uses: docker/setup-buildx-action@v3.11.1 - name: Login to Docker Hub - uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3 + uses: docker/login-action@v3.6.0 with: username: deepnotebot password: ${{ secrets.DOCKERHUB_PASS }} - name: Export version id: version - uses: ./.github/actions/export-version + uses: $/.github/actions/export-version - name: Configure AWS - uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a + uses: aws-actions/configure-aws-credentials@v4.3.1 with: role-to-assume: ${{ secrets.AWS_STAGING_ROLE_ARN }} aws-region: ${{ env.AWS_REGION }} @@ -624,22 +624,22 @@ jobs: if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') steps: - name: Checkout code - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + uses: actions/checkout@v4.3.0 with: persist-credentials: false - name: Set up Docker Buildx - uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3 + uses: docker/setup-buildx-action@v3.11.1 - name: Login to Docker Hub - uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3 + uses: docker/login-action@v3.6.0 with: username: deepnotebot password: ${{ secrets.DOCKERHUB_PASS }} - name: Export version id: version - uses: ./.github/actions/export-version + uses: $/.github/actions/export-version - name: Build toolkit-cache docker image env: @@ -668,16 +668,16 @@ jobs: cancel-in-progress: false steps: - name: Checkout code - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + uses: actions/checkout@v4.3.0 with: persist-credentials: false - name: Export version id: version - uses: ./.github/actions/export-version + uses: $/.github/actions/export-version - name: Update ops repo single-tenant staging version - uses: ./.github/actions/update-config-version + uses: $/.github/actions/update-config-version with: env: staging versions: | @@ -688,7 +688,7 @@ jobs: github_token: ${{ secrets.DEEPNOTE_BOT_USER_TOKEN }} - name: Update app-config repo multi-tenant staging version - uses: ./.github/actions/update-config-version + uses: $/.github/actions/update-config-version with: env: staging versions: | @@ -708,17 +708,17 @@ jobs: if: startsWith(github.ref, 'refs/tags/') steps: - name: Checkout code - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + uses: actions/checkout@v4.3.0 with: persist-credentials: false - name: Export version id: version - uses: ./.github/actions/export-version + uses: $/.github/actions/export-version - name: Update production version id: update-ops - uses: ./.github/actions/update-config-version + uses: $/.github/actions/update-config-version with: env: production versions: | @@ -730,7 +730,7 @@ jobs: - name: Notify Slack - ops production PR created if: always() && steps.update-ops.outcome == 'success' && steps.update-ops.outputs.pr_url != '' - uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1 + uses: slackapi/slack-github-action@v2.1.1 with: webhook: ${{ secrets.SLACK_WEBHOOK_PRODUCTION }} webhook-type: incoming-webhook @@ -742,7 +742,7 @@ jobs: - name: Notify Slack - ops production PR failed if: always() && steps.update-ops.outcome == 'failure' - uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1 + uses: slackapi/slack-github-action@v2.1.1 with: webhook: ${{ secrets.SLACK_WEBHOOK_PRODUCTION }} webhook-type: incoming-webhook @@ -754,7 +754,7 @@ jobs: - name: Update app-config repo multi-tenant production version id: update-app-config - uses: ./.github/actions/update-config-version + uses: $/.github/actions/update-config-version with: env: production versions: | @@ -768,7 +768,7 @@ jobs: - name: Notify Slack - app-config production PR created if: always() && steps.update-app-config.outcome == 'success' && steps.update-app-config.outputs.pr_url != '' - uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1 + uses: slackapi/slack-github-action@v2.1.1 with: webhook: ${{ secrets.SLACK_WEBHOOK_PRODUCTION }} webhook-type: incoming-webhook @@ -780,7 +780,7 @@ jobs: - name: Notify Slack - app-config production PR failed if: always() && steps.update-app-config.outcome == 'failure' - uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1 + uses: slackapi/slack-github-action@v2.1.1 with: webhook: ${{ secrets.SLACK_WEBHOOK_PRODUCTION }} webhook-type: incoming-webhook diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85396858..3fbc4129 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,13 +24,13 @@ jobs: name: Spell Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + - uses: actions/checkout@v4.3.0 with: persist-credentials: false - name: Set up Python id: setup-python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + uses: actions/setup-python@v5.6.0 with: python-version: '3.11' @@ -39,7 +39,7 @@ jobs: - name: Cache dependencies id: cache-deps - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 + uses: actions/cache@v4.3.0 with: path: .venv key: venv-v2-${{ github.event.pull_request.head.repo.full_name || github.repository }}-${{ runner.os }}-${{ runner.arch }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} @@ -55,13 +55,13 @@ jobs: name: Format runs-on: ubuntu-latest steps: - - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + - uses: actions/checkout@v4.3.0 with: persist-credentials: false - name: Set up Python id: setup-python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + uses: actions/setup-python@v5.6.0 with: python-version: '3.11' @@ -70,7 +70,7 @@ jobs: - name: Cache dependencies id: cache-deps - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 + uses: actions/cache@v4.3.0 with: path: .venv key: venv-v2-${{ github.event.pull_request.head.repo.full_name || github.repository }}-${{ runner.os }}-${{ runner.arch }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} @@ -90,13 +90,13 @@ jobs: # This only checks production dependencies inclusive of the dev deps that are actually prod deps (see pyproject.toml). runs-on: ubuntu-latest steps: - - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + - uses: actions/checkout@v4.3.0 with: persist-credentials: false - name: Set up Python id: setup-python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + uses: actions/setup-python@v5.6.0 with: python-version: '3.11' @@ -129,7 +129,7 @@ jobs: echo "✅ All licenses are compatible with Apache 2.0" - name: Upload license report - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@v4.6.2 if: always() with: name: license-report @@ -147,13 +147,13 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + uses: actions/checkout@v4.3.0 with: persist-credentials: false - name: Set up Python ${{ matrix.python-version }} id: setup-python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + uses: actions/setup-python@v5.6.0 with: python-version: ${{ matrix.python-version }} @@ -162,7 +162,7 @@ jobs: - name: Cache dependencies id: cache-deps - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 + uses: actions/cache@v4.3.0 with: path: .venv key: venv-v2-${{ github.event.pull_request.head.repo.full_name || github.repository }}-${{ runner.os }}-${{ runner.arch }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} @@ -196,13 +196,13 @@ jobs: if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request' steps: - name: Checkout code - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + uses: actions/checkout@v4.3.0 with: fetch-depth: 0 persist-credentials: false - name: Run Gitleaks - uses: gitleaks/gitleaks-action@ff98106e4c7b2bc287b24eaf42907196329070c7 # v2 + uses: gitleaks/gitleaks-action@v2.3.9 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }} @@ -222,7 +222,7 @@ jobs: image: returntocorp/semgrep steps: - - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + - uses: actions/checkout@v4.3.0 with: fetch-depth: 0 persist-credentials: false @@ -239,7 +239,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + uses: actions/checkout@v4.3.0 with: persist-credentials: false @@ -261,29 +261,29 @@ jobs: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - name: Checkout code - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + uses: actions/checkout@v4.3.0 with: persist-credentials: false - name: Export version id: version - uses: ./.github/actions/export-version + uses: $/.github/actions/export-version - name: Set up Python ${{ matrix.python-version }} id: setup-python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + uses: actions/setup-python@v5.6.0 with: python-version: ${{ matrix.python-version }} - name: Set up Java 17 - uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4 + uses: actions/setup-java@v4.7.1 with: distribution: 'temurin' java-version: '17' - name: Load cached Poetry installation id: cached-poetry - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 + uses: actions/cache@v4.3.0 with: path: ~/.local key: poetry-${{ github.event.pull_request.head.repo.full_name || github.repository }}-${{ runner.os }}-${{ runner.arch }}-py${{ steps.setup-python.outputs.python-version }}-poetry${{ env.POETRY_VERSION }} @@ -297,7 +297,7 @@ jobs: - name: Cache dependencies id: cache-deps - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 + uses: actions/cache@v4.3.0 with: path: .venv key: venv-v2-${{ github.event.pull_request.head.repo.full_name || github.repository }}-${{ runner.os }}-${{ runner.arch }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} @@ -337,13 +337,13 @@ jobs: - name: Upload test results to Codecov if: ${{ !cancelled() }} - uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1 + uses: codecov/test-results-action@v1.1.1 with: token: ${{ secrets.CODECOV_TOKEN }} flags: python-${{ matrix.python-version }} - name: Upload coverage artifacts - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@v4.6.2 with: name: coverage-${{ matrix.python-version }} path: .coverage @@ -358,12 +358,12 @@ jobs: if: always() steps: - name: Checkout code - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + uses: actions/checkout@v4.3.0 with: persist-credentials: false - name: Set up Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + uses: actions/setup-python@v5.6.0 with: python-version: '3.11' @@ -371,7 +371,7 @@ jobs: run: pip install coverage[toml] - name: Download all coverage artifacts - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4 + uses: actions/download-artifact@v4.1.8 with: pattern: coverage-* path: coverage-artifacts/ @@ -395,7 +395,7 @@ jobs: coverage report --format=markdown >> $GITHUB_STEP_SUMMARY - name: Upload combined coverage to Codecov - uses: codecov/codecov-action@5975040f7f7d40edaff8d784b576fd65ae95c073 # v5.5.5 + uses: codecov/codecov-action@v5.5.5 with: token: ${{ secrets.CODECOV_TOKEN }} slug: ${{ github.repository }} @@ -405,7 +405,7 @@ jobs: fail_ci_if_error: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push' }} - name: Upload combined coverage report - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@v4.6.2 with: name: coverage-combined-report path: coverage-data/coverage.xml @@ -423,14 +423,14 @@ jobs: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - name: Checkout code - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + uses: actions/checkout@v4.3.0 with: fetch-depth: 0 fetch-tags: true persist-credentials: false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + uses: actions/setup-python@v5.6.0 with: python-version: ${{ matrix.python-version }} @@ -439,7 +439,7 @@ jobs: - name: Build wheel id: build - uses: ./.github/actions/build-wheel + uses: $/.github/actions/build-wheel - name: Install wheel without the lock and import the toolkit env: @@ -466,13 +466,13 @@ jobs: - name: Dev export-args: --only dev steps: - - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + - uses: actions/checkout@v4.3.0 with: persist-credentials: false - name: Set up Python id: setup-python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + uses: actions/setup-python@v5.6.0 with: python-version: '3.11' diff --git a/.github/workflows/verify-actions-lock.yml b/.github/workflows/verify-actions-lock.yml new file mode 100644 index 00000000..20160e83 --- /dev/null +++ b/.github/workflows/verify-actions-lock.yml @@ -0,0 +1,20 @@ +name: Verify GitHub Actions lockfile + +on: + pull_request: + push: + branches: + - main + +permissions: + contents: read + +jobs: + actions-lock: + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v6.1.0 + - run: gh extension install github/gh-actions-lock --pin v0.4.1 && gh actions-lock --verify + env: + GH_TOKEN: ${{ github.token }} diff --git a/renovate.json b/renovate.json index d267b262..cf2fdc57 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,9 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "configMigration": true, + "constraints": { + "ghActionsLock": "v0.4.1" + }, "draftPR": true, "github-actions": { "enabled": true,