diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7ea437f3..8dbbe0de6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,12 +23,12 @@ jobs: steps: # Full history: scripts/check_file_sizes.py diffs against the base # branch's merge base, which a shallow clone cannot resolve. - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - name: Install uv - uses: astral-sh/setup-uv@v10.3.3 + uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 with: enable-cache: true cache-dependency-glob: uv.lock @@ -46,10 +46,10 @@ jobs: name: unit tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv - uses: astral-sh/setup-uv@v10.3.3 + uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 with: enable-cache: true cache-dependency-glob: uv.lock @@ -69,10 +69,10 @@ jobs: # Bound runner occupancy even if collection or teardown hangs. timeout-minutes: 40 steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv - uses: astral-sh/setup-uv@v10.3.3 + uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 with: enable-cache: true cache-dependency-glob: uv.lock @@ -99,10 +99,10 @@ jobs: name: unit tests (3.13) runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv - uses: astral-sh/setup-uv@v10.3.3 + uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 with: enable-cache: true cache-dependency-glob: uv.lock @@ -120,10 +120,10 @@ jobs: name: integration tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv - uses: astral-sh/setup-uv@v10.3.3 + uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 with: enable-cache: true cache-dependency-glob: uv.lock @@ -141,10 +141,10 @@ jobs: name: integration tests (3.13) runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv - uses: astral-sh/setup-uv@v10.3.3 + uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 with: enable-cache: true cache-dependency-glob: uv.lock @@ -162,10 +162,10 @@ jobs: name: integration tests (Milvus 2.6) runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv - uses: astral-sh/setup-uv@v10.3.3 + uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 with: enable-cache: true cache-dependency-glob: uv.lock @@ -249,10 +249,10 @@ jobs: name: package build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv - uses: astral-sh/setup-uv@v10.3.3 + uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 with: enable-cache: true cache-dependency-glob: uv.lock diff --git a/.github/workflows/commits.yml b/.github/workflows/commits.yml index 5b4f526be..4d5c4b114 100644 --- a/.github/workflows/commits.yml +++ b/.github/workflows/commits.yml @@ -18,7 +18,7 @@ jobs: if: github.event_name == 'pull_request' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Validate Conventional Commit PR title env: @@ -32,7 +32,7 @@ jobs: name: commit messages runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ffe5ca2f0..be6bcc0b5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -21,7 +21,7 @@ jobs: links: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Validate Markdown docs run: make docs-check diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7988ce4f6..7ef48892c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,10 +28,10 @@ jobs: id-token: write # OIDC token for PyPI Trusted Publishing contents: read steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv - uses: astral-sh/setup-uv@v10.3.3 + uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 with: enable-cache: true cache-dependency-glob: uv.lock @@ -54,7 +54,7 @@ jobs: run: make package # builds sdist+wheel into dist/ and import-smokes it - name: Publish to PyPI (Trusted Publishing) - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3 # The notes page is a separate job so the publish job above keeps # `contents: read` next to its OIDC token. It runs only after PyPI accepted @@ -69,7 +69,7 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 # the whole tag list, to name the previous release diff --git a/docs/engineering.md b/docs/engineering.md index 4c0e65424..33ea0fe4a 100644 --- a/docs/engineering.md +++ b/docs/engineering.md @@ -126,7 +126,10 @@ stores and indexes, `make_ops` / `make_memory_service` / ## Continuous integration CI runs on GitHub Actions ([.github/workflows/](../.github/workflows/)). Every -pull request into `main` must pass: +`uses:` pins an action to a full commit SHA with its version in a trailing +comment (`actions/checkout@ # v7.0.1`): a tag or branch can be moved to +other code, a commit cannot. Dependabot updates the SHA and the comment +together. Every pull request into `main` must pass: | Check | Command | Guards | |---|---|---| diff --git a/docs/github-sync.md b/docs/github-sync.md index cdb08ee3d..075a6367d 100644 --- a/docs/github-sync.md +++ b/docs/github-sync.md @@ -35,7 +35,7 @@ community-facing text). Keep the GitHub versions: - `CONTRIBUTING.md` — says "curated PR contributions", not "no external PRs" - `.github/PULL_REQUEST_TEMPLATE.md` — GitHub PR template - `.github/BRANCH_PROTECTION.md` — GitHub branch protection rules -- `.github/workflows/ci.yml` — targets `main`, uses `actions/checkout@v6` +- `.github/workflows/ci.yml` — targets `main`, pins every action to a commit SHA - `.github/workflows/docs.yml` — GitHub-only doc checks - `.github/workflows/commits.yml` — GitHub-only commit lint - `.github/ISSUE_TEMPLATE/**` — `.yml` format (GitLab uses `.md`)