From 65b632ca813abc49449bc287888a8951ab8055e1 Mon Sep 17 00:00:00 2001 From: Leonardo Di Donato <120051+leodido@users.noreply.github.com> Date: Mon, 25 May 2026 15:43:13 +0200 Subject: [PATCH 1/5] ci: dispatch CI for kernel-version refresh PRs --- .github/workflows/ci.yml | 1 + .github/workflows/refresh-kernel-versions.yml | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26ac6d2..bb0bdb1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: branches: [main] pull_request: branches: [main] + workflow_dispatch: permissions: contents: read diff --git a/.github/workflows/refresh-kernel-versions.yml b/.github/workflows/refresh-kernel-versions.yml index 100332a..a50a0be 100644 --- a/.github/workflows/refresh-kernel-versions.yml +++ b/.github/workflows/refresh-kernel-versions.yml @@ -22,6 +22,9 @@ on: default: "" permissions: + # Needed only to dispatch CI on the bot-created PR branch. Pull-request + # events caused by GITHUB_TOKEN do not trigger workflows automatically. + actions: write contents: write pull-requests: write @@ -118,3 +121,10 @@ jobs: `internal/kernelversions/cmd/kvgen/known_gaps.go`. labels: | dependencies + + - name: Run CI on refresh PR branch + if: steps.drift.outputs.changed == 'true' + env: + GH_TOKEN: ${{ github.token }} + run: | + gh workflow run ci.yml --ref chore/refresh-kernel-versions From fa9a80c9e5f76c690226f36f5c40c21761b300dd Mon Sep 17 00:00:00 2001 From: Leonardo Di Donato <120051+leodido@users.noreply.github.com> Date: Mon, 25 May 2026 15:52:07 +0200 Subject: [PATCH 2/5] ci: pin CI workflow actions and tools --- .github/workflows/ci.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb0bdb1..faeda56 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,9 +18,9 @@ jobs: matrix: go-version: ["1.24"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - - uses: actions/setup-go@v5 + - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 with: go-version: ${{ matrix.go-version }} @@ -43,7 +43,7 @@ jobs: id: setup-bats uses: bats-core/bats-action@5b1e60c2ee94cb1b44a616ea4b1f466f9d6e38ef # v4.0.0 with: - bats-version: latest + bats-version: v1.13.0 support-install: true assert-install: true detik-install: false @@ -59,9 +59,9 @@ jobs: name: CLI (macOS) runs-on: macos-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - - uses: actions/setup-go@v5 + - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 with: go-version: "1.24" @@ -72,7 +72,7 @@ jobs: id: setup-bats uses: bats-core/bats-action@5b1e60c2ee94cb1b44a616ea4b1f466f9d6e38ef # v4.0.0 with: - bats-version: latest + bats-version: v1.13.0 support-install: true assert-install: true detik-install: false @@ -88,9 +88,9 @@ jobs: name: Integration (Linux) runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - - uses: actions/setup-go@v5 + - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 with: go-version: "1.24" @@ -109,7 +109,7 @@ jobs: id: setup-bats uses: bats-core/bats-action@5b1e60c2ee94cb1b44a616ea4b1f466f9d6e38ef # v4.0.0 with: - bats-version: latest + bats-version: v1.13.0 support-install: true assert-install: true detik-install: false @@ -127,12 +127,12 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - - uses: actions/setup-go@v5 + - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 with: go-version: "1.24" - - uses: golangci/golangci-lint-action@v6 + - uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6 with: - version: latest + version: v2.12.2 From 466195245e9c632202cdaba4b0357c2f87b7d69a Mon Sep 17 00:00:00 2001 From: Leonardo Di Donato <120051+leodido@users.noreply.github.com> Date: Mon, 25 May 2026 15:54:47 +0200 Subject: [PATCH 3/5] ci: use pinned golangci action with v2 support --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index faeda56..f67c04f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -133,6 +133,6 @@ jobs: with: go-version: "1.24" - - uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6 + - uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee # v9.2.1 with: version: v2.12.2 From 3170436b7fe27a6478b5c4588f1618b72f02801e Mon Sep 17 00:00:00 2001 From: Leonardo Di Donato <120051+leodido@users.noreply.github.com> Date: Mon, 25 May 2026 15:58:47 +0200 Subject: [PATCH 4/5] ci: pin golangci-lint to prior release --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f67c04f..64ca3c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,4 +135,4 @@ jobs: - uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee # v9.2.1 with: - version: v2.12.2 + version: v1.64.8 From 715c6dc494eed4047339ae3885b497eca30afe5a Mon Sep 17 00:00:00 2001 From: Leonardo Di Donato <120051+leodido@users.noreply.github.com> Date: Mon, 25 May 2026 16:00:53 +0200 Subject: [PATCH 5/5] ci: verify pinned golangci-lint binary --- .github/workflows/ci.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64ca3c2..4615929 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -133,6 +133,15 @@ jobs: with: go-version: "1.24" - - uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee # v9.2.1 - with: - version: v1.64.8 + - name: Install golangci-lint + env: + GOLANGCI_LINT_VERSION: "1.64.8" + GOLANGCI_LINT_SHA256: b6270687afb143d019f387c791cd2a6f1cb383be9b3124d241ca11bd3ce2e54e + run: | + curl -fsSLo /tmp/golangci-lint.tar.gz "https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_LINT_VERSION}/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz" + echo "${GOLANGCI_LINT_SHA256} /tmp/golangci-lint.tar.gz" | sha256sum -c - + tar -xzf /tmp/golangci-lint.tar.gz -C /tmp + echo "/tmp/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64" >> "$GITHUB_PATH" + + - name: Lint + run: golangci-lint run