From d3ecfc53ad4855169bb5eaf5bd1d4c5feece3832 Mon Sep 17 00:00:00 2001 From: Ignacio Rodriguez Paez Date: Wed, 11 Nov 2026 10:22:30 +0000 Subject: [PATCH] Pin GitHub Actions to commit SHAs Sourcegraph-Batch-Change: https://sourcegraph.sourcegraph.com/batch-change-agents/1257 --- .github/workflows/diff-tour.yml | 2 +- .github/workflows/docker-check.yml | 6 +++--- .github/workflows/docker.yml | 6 +++--- .github/workflows/go-ci.yml | 6 +++--- .github/workflows/go-lint.yml | 6 +++--- .github/workflows/goreleaser-check.yml | 4 ++-- .github/workflows/goreleaser.yml | 18 +++++++++--------- .github/workflows/npm-check.yml | 2 +- .github/workflows/scip.yml | 4 ++-- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/diff-tour.yml b/.github/workflows/diff-tour.yml index 78abbc7c51..b4d0564a53 100644 --- a/.github/workflows/diff-tour.yml +++ b/.github/workflows/diff-tour.yml @@ -24,4 +24,4 @@ jobs: # Diff Tour resolves branch names against the base repo, so skip fork PRs if: github.event.pull_request.head.repo.full_name == github.repository steps: - - uses: sourcegraph/actions/diff-tour@main + - uses: sourcegraph/actions/diff-tour@4430dc1e4dde002387a4b655b41f6431ca75b1c1 # main diff --git a/.github/workflows/docker-check.yml b/.github/workflows/docker-check.yml index 8ba757f355..4b7297a6a3 100644 --- a/.github/workflows/docker-check.yml +++ b/.github/workflows/docker-check.yml @@ -17,12 +17,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Get Go version from mise id: mise run: echo "go-version=$(grep 'golang' mise.toml | cut -d'"' -f2)" >> "$GITHUB_OUTPUT" - name: Set up Go - uses: actions/setup-go@v7 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ steps.mise.outputs.go-version }} cache: false @@ -41,7 +41,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Build docker/batch-change-volume-workspace run: docker build --tag volume-workspace docker/batch-change-volume-workspace - run: docker run --rm volume-workspace sh -c 'git --version && unzip -v' diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 708a28d931..4c8b06a691 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -16,16 +16,16 @@ jobs: runs-on: ubuntu-26.04 steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # We need buildx to be able to build a multi-architecture image. - name: Set up Docker buildx - uses: docker/setup-buildx-action@v4 + uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 # We also need QEMU, since this is running on an AMD64 host and we want to # build ARM64 images. - name: Set up QEMU - uses: docker/setup-qemu-action@v4 + uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0 with: platforms: arm64 diff --git a/.github/workflows/go-ci.yml b/.github/workflows/go-ci.yml index d11d734112..b06be6bc98 100644 --- a/.github/workflows/go-ci.yml +++ b/.github/workflows/go-ci.yml @@ -11,13 +11,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Get Go version from mise id: mise run: echo "go-version=$(grep 'golang' mise.toml | cut -d'"' -f2)" >> $GITHUB_OUTPUT shell: bash - name: Set up Go - uses: actions/setup-go@v7 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ steps.mise.outputs.go-version }} # setup-go's built-in cache keys on go.sum alone, has no fallback @@ -33,7 +33,7 @@ jobs: echo "build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT" echo "modules=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT" - name: Cache Go modules and build output - uses: actions/cache@v6 + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: | ${{ steps.go-cache.outputs.modules }} diff --git a/.github/workflows/go-lint.yml b/.github/workflows/go-lint.yml index 61a3b5ced0..bc1e94ae85 100644 --- a/.github/workflows/go-lint.yml +++ b/.github/workflows/go-lint.yml @@ -9,12 +9,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Get Go version from mise id: mise run: echo "go-version=$(grep 'golang' mise.toml | cut -d'"' -f2)" >> $GITHUB_OUTPUT - name: Set up Go - uses: actions/setup-go@v7 + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ steps.mise.outputs.go-version }} # See go-ci.yml for why the built-in cache is off. @@ -25,7 +25,7 @@ jobs: echo "build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT" echo "modules=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT" - name: Cache Go modules, build output, and golangci-lint analysis - uses: actions/cache@v6 + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: | ${{ steps.go-cache.outputs.modules }} diff --git a/.github/workflows/goreleaser-check.yml b/.github/workflows/goreleaser-check.yml index 7e00d61472..229bcafe7b 100644 --- a/.github/workflows/goreleaser-check.yml +++ b/.github/workflows/goreleaser-check.yml @@ -9,11 +9,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # `goreleaser check` only parses the config; it needs neither Go nor # git history. - name: Check GoReleaser config - uses: goreleaser/goreleaser-action@v7 + uses: goreleaser/goreleaser-action@a4f02ab5355a589de60d917a659ce617ed19b3de # v7.3.0 with: # Pinned: GoReleaser v2.10+ deprecates `brews`, which fails # `goreleaser check`. Unpin after moving to `homebrew_casks`. diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 7b48f00265..33b7758a74 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -47,7 +47,7 @@ jobs: second_latest_tag: ${{ env.second_latest_tag }} steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - name: Set current tag, latest (highest version) tag, and second latest tag @@ -103,7 +103,7 @@ jobs: echo "latest_tag=${{ needs.release_type.outputs.latest_tag }}" >> $GITHUB_ENV echo "second_latest_tag=${{ needs.release_type.outputs.second_latest_tag }}" >> $GITHUB_ENV - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - name: Set versioning variables @@ -116,7 +116,7 @@ jobs: echo "Versioned formula file: ${{ env.versioned_formula_file }}" echo "Versioned classname: ${{ env.versioned_classname }}" - name: Checkout Homebrew tap - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: sourcegraph/homebrew-src-cli fetch-depth: 0 @@ -171,14 +171,14 @@ jobs: run: | echo "Goreleaser config file: ${{ env.config_file }}" - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - name: Get Go version from mise id: mise run: echo "go-version=$(grep 'golang' mise.toml | cut -d'"' -f2)" >> $GITHUB_OUTPUT - name: Set up Go - uses: sourcegraph/actions/go-setup@main + uses: sourcegraph/actions/go-setup@4430dc1e4dde002387a4b655b41f6431ca75b1c1 # main with: go-version: ${{ steps.mise.outputs.go-version }} - run: go test ./... @@ -188,7 +188,7 @@ jobs: DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v7 + uses: goreleaser/goreleaser-action@a4f02ab5355a589de60d917a659ce617ed19b3de # v7.3.0 with: # Keep in sync with the version in goreleaser-check.yml. version: v2.9.0 @@ -224,7 +224,7 @@ jobs: echo "Old symlink: ${{ env.old_symlink_name }}" echo "New symlink: ${{ env.new_symlink_name }}" - name: Checkout Homebrew tap - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: sourcegraph/homebrew-src-cli fetch-depth: 0 @@ -245,10 +245,10 @@ jobs: needs: goreleaser steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - - uses: actions/setup-node@v7 + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: 26.13.0 registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/npm-check.yml b/.github/workflows/npm-check.yml index d06cc2f505..92291a5eb6 100644 --- a/.github/workflows/npm-check.yml +++ b/.github/workflows/npm-check.yml @@ -16,7 +16,7 @@ jobs: working-directory: npm-distribution steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # The install script downloads the release binary for package.json's # version, which does not exist until the tag is published. - run: npm ci --ignore-scripts diff --git a/.github/workflows/scip.yml b/.github/workflows/scip.yml index 8117010145..06b83af9e6 100644 --- a/.github/workflows/scip.yml +++ b/.github/workflows/scip.yml @@ -6,12 +6,12 @@ jobs: scip-go: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Get Go version from mise id: mise run: echo "go-version=$(grep 'golang' mise.toml | cut -d'"' -f2)" >> $GITHUB_OUTPUT - name: Set up Go - uses: sourcegraph/actions/go-setup@main + uses: sourcegraph/actions/go-setup@4430dc1e4dde002387a4b655b41f6431ca75b1c1 # main with: go-version: ${{ steps.mise.outputs.go-version }}