diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index 86699fd0..cae926d6 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -15,7 +15,7 @@ runs: steps: - name: Setup uv id: setup-uv - uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2 + uses: astral-sh/setup-uv@v10.3.2 with: enable-cache: true version-file: uv.lock @@ -37,7 +37,7 @@ runs: - name: pre-commit Cache id: pre-commit-cache if: inputs.cache-pre-commit == 'true' - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + uses: actions/cache@v6.1.0 with: path: ~/.cache/pre-commit/ key: cache-${{ inputs.cache-version }}-${{ runner.os }}-${{ runner.arch }}-pre-commit-${{ steps.pre-commit-version.outputs.pre-commit-version }}-python-${{ inputs.python-version }}-${{ steps.setup-uv.outputs.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }} diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock new file mode 100644 index 00000000..c1a4f580 --- /dev/null +++ b/.github/workflows/actions.lock @@ -0,0 +1,84 @@ +# 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/ci.yml': + - 'actions/cache@v6.1.0' + - 'actions/checkout@v7.0.1' + - 'astral-sh/setup-uv@v10.3.2' + - 'codecov/codecov-action@v7.1.1' + '.github/workflows/codeql-analysis.yml': + - 'actions/checkout@v7.0.1' + - 'github/codeql-action@v4.39.1' + '.github/workflows/publish.yml': + - 'actions/checkout@v7.0.1' + - 'astral-sh/setup-uv@v10.3.2' + - 'pypa/gh-action-pypi-publish@v1.14.3' + '.github/workflows/release-draft.yml': + - 'actions/checkout@v6.0.2' + - 'astral-sh/setup-uv@v8.3.0' + '.github/workflows/stale.yml': + - 'actions/stale@v11.0.0' + '.github/workflows/verify-gh-locks.yml': + - 'actions/checkout@v7.0.1' +dependencies: + 'actions/cache@v6.1.0': + ref: 'v6.1.0' + commit: 'sha1-55cc8345863c7cc4c66a329aec7e433d2d1c52a9' + owner_id: 44036562 + repo_id: 215566462 + 'actions/checkout@v6.0.2': + ref: 'v6.0.2' + commit: 'sha1-de0fac2e4500dabe0009e67214ff5f5447ce83dd' + 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/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd': + ref: 'v8.0.0' + commit: 'sha1-ed597411d8f924073f98dfc5c65a23a2325f34cd' + owner_id: 44036562 + repo_id: 205262760 + 'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405': + ref: 'v6.2.0' + commit: 'sha1-a309ff8b426b58ec0e2a45f0f869d46889d02405' + owner_id: 44036562 + repo_id: 192625525 + 'actions/stale@v11.0.0': + ref: 'v11.0.0' + commit: 'sha1-4391f3da665fdf50b6810c1a66712fb9ba21aa93' + owner_id: 44036562 + repo_id: 200437066 + 'astral-sh/setup-uv@v10.3.2': + ref: 'v10.3.2' + commit: 'sha1-07a047e608db84b3d8c06cd9a7c7dcc9c355c18e' + owner_id: 115962839 + repo_id: 846733598 + 'astral-sh/setup-uv@v8.3.0': + ref: 'v8.3.0' + commit: 'sha1-d31148d669074a8d0a63714ba94f3201e7020bc3' + owner_id: 115962839 + repo_id: 846733598 + 'codecov/codecov-action@v7.1.1': + ref: 'v7.1.1' + commit: 'sha1-303a32d7a59b442fa8d48b6a1cc6825c09c847a5' + owner_id: 8226205 + repo_id: 200299178 + uses: + - 'actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd' + 'github/codeql-action@v4.39.1': + ref: 'v4.39.1' + commit: 'sha1-9b3254085494b55a0f7c4c2b3d2d52cc712ce370' + owner_id: 9919 + repo_id: 259445878 + 'pypa/gh-action-pypi-publish@v1.14.3': + ref: 'v1.14.3' + commit: 'sha1-7245906fb61fa33a13554f9d5fb856fe61758086' + owner_id: 647025 + repo_id: 178055147 + uses: + - 'actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eeb64afa..c79f6d14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,11 +29,11 @@ jobs: steps: - name: Checkout Source Files id: checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 - name: Setup Environment id: setup-environment - uses: ./.github/actions/setup + uses: $/.github/actions/setup with: python-version: ${{ matrix.python-version }} cache-pre-commit: true @@ -42,13 +42,15 @@ jobs: - name: Run pre-commit Checks id: run-pre-commit shell: bash + env: + SKIP: actions-lock run: | uv run pre-commit run --all-files --verbose # Build the same way as publish.yml to catch packaging issues before a release is tagged. - name: Build and Check Packages id: build-packages - uses: ./.github/actions/build-packages + uses: $/.github/actions/build-packages tests: name: Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} @@ -68,11 +70,11 @@ jobs: steps: - name: Checkout Source Files id: checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 - name: Setup Environment id: setup-environment - uses: ./.github/actions/setup + uses: $/.github/actions/setup with: python-version: ${{ matrix.python-version }} uv-install-options: ${{ matrix.extras == true && '--all-extras' || '' }} @@ -85,6 +87,6 @@ jobs: - name: Upload Code Coverage to Codecov id: upload-code-coverage-to-codecov - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 + uses: codecov/codecov-action@v7.1.1 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 01672706..1e6b758a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,14 +39,14 @@ jobs: steps: - name: Checkout Source Files id: checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 - name: Initialize CodeQL id: init-codeql - uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 + uses: github/codeql-action/init@v4.39.1 with: languages: ${{ matrix.language }} - name: Perform CodeQL Analysis id: perform-codeql-analysis - uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 + uses: github/codeql-action/analyze@v4.39.1 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 02ea9619..fbd2d01a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,22 +17,22 @@ jobs: steps: - name: Checkout Source Files id: checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@v7.0.1 - name: Setup uv id: setup-uv - uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2 + uses: astral-sh/setup-uv@v10.3.2 with: version-file: uv.lock python-version: ${{ env.PYTHON_VERSION }} - name: Build and Check Packages id: build-packages - uses: ./.github/actions/build-packages + uses: $/.github/actions/build-packages - name: Publish Release on PyPI id: publish-release-on-pypi - uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3 + uses: pypa/gh-action-pypi-publish@v1.14.3 with: # Metadata is already verified by the build action, same as in CI. verify-metadata: false diff --git a/.github/workflows/release-draft.yml b/.github/workflows/release-draft.yml index a076bdf4..6a8a0dfd 100644 --- a/.github/workflows/release-draft.yml +++ b/.github/workflows/release-draft.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout Source Files id: checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + uses: actions/checkout@v6.0.2 with: ref: ${{ github.event.pull_request.merge_commit_sha }} persist-credentials: false @@ -34,7 +34,7 @@ jobs: # release.py declares its dependencies inline and is run by uv. - name: Setup uv id: setup-uv - uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0 + uses: astral-sh/setup-uv@v8.3.0 with: version-file: uv.lock diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index f9fbae38..ba469fc4 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Stale Issues and PRs Policy id: stale-issues-and-prs-policy - uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0 + uses: actions/stale@v11.0.0 with: repo-token: ${{ github.token }} days-before-stale: 90 @@ -46,7 +46,7 @@ jobs: - name: needs-more-information and waiting-for-reporter Stale Issues Policy id: specific-stale-issues-policy - uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0 + uses: actions/stale@v11.0.0 with: repo-token: ${{ github.token }} only-labels: "needs-more-information,waiting-for-reporter" diff --git a/.github/workflows/verify-gh-locks.yml b/.github/workflows/verify-gh-locks.yml new file mode 100644 index 00000000..683ce686 --- /dev/null +++ b/.github/workflows/verify-gh-locks.yml @@ -0,0 +1,26 @@ +name: verify-lockfile + +on: + pull_request: + paths: + - '.github/workflows/**' + push: + branches: + - master + paths: + - '.github/workflows/**' + +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/.pre-commit-config.yaml b/.pre-commit-config.yaml index bbcc1712..a60574d0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -55,3 +55,9 @@ repos: language: system # Required or pre-commit creates a new venv types: [json] pass_filenames: false # passing filenames causes the hook to run in batches against all-files + - id: actions-lock + name: Verify GitHub Actions lockfile + entry: gh actions-lock --verify-local + language: system + files: ^\.github/workflows/ + pass_filenames: false