CI: remove unused worklow; use GITHUB_TOKEN where possible (#104657)

* remove unused worklow; use GITHUB_TOKEN where possible

* pin usages of checkout and setup-go

* Fix zizmor errors

* add zizmor.yml

* fix `changelog.yml`

* fix `core-plugins-build-and-release.yml`

* fix `release-comms.yml`

* update release-pr.yml and run-e2e-suite.yml

* Fix errors in files outside of .github/workflows

* Remove path filter on zizmor.yml

---------

Co-authored-by: Sven Grossmann <svennergr@gmail.com>
Co-authored-by: joshhunt <josh.hunt@grafana.com>
This commit is contained in:
Kevin Minehart
2025-04-29 10:09:23 -05:00
committed by GitHub
co-authored by Sven Grossmann joshhunt
parent 97a1614cde
commit 97d10b5095
68 changed files with 478 additions and 470 deletions
@@ -6,9 +6,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
id-token: write
permissions: {}
on:
pull_request:
@@ -24,12 +22,16 @@ jobs:
defaults:
run:
working-directory: './pr'
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
path: './pr'
- uses: actions/setup-node@v4
persist-credentials: false
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e
with:
node-version: 22.11.0
@@ -67,17 +69,20 @@ jobs:
buildBase:
name: Build Base packages artifacts
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
defaults:
run:
working-directory: './base'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
path: './base'
ref: ${{ github.event.pull_request.base.ref }}
- uses: actions/setup-node@v4
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e
with:
node-version: 22.11.0
@@ -123,8 +128,8 @@ jobs:
id-token: 'write'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e
with:
node-version: 22.11.0
@@ -145,14 +150,14 @@ jobs:
run: unzip -j base_built_packages.zip -d ./base && rm base_built_packages.zip
- id: 'auth'
uses: 'google-github-actions/auth@v2'
uses: 'google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f'
with:
workload_identity_provider: ${{ secrets.WIF_PROVIDER }}
service_account: ${{ secrets.LEVITATE_SA }}
project_id: 'grafanalabs-global'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
uses: 'google-github-actions/setup-gcloud@6189d56e4096ee891640bb02ac264be376592d6a'
with:
version: '>= 363.0.0'
project_id: 'grafanalabs-global'
@@ -180,6 +185,9 @@ jobs:
name: Report breaking changes in PR comment
runs-on: ubuntu-latest
needs: ['Detect']
permissions:
contents: read
id-token: write
steps:
- name: "Generate token"
@@ -189,7 +197,7 @@ jobs:
app_id: ${{ secrets.GRAFANA_PR_AUTOMATION_APP_ID }}
private_key: ${{ secrets.GRAFANA_PR_AUTOMATION_APP_PEM }}
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: 'Download artifact'
uses: actions/download-artifact@v4
@@ -238,7 +246,7 @@ jobs:
# Comment on the PR
- name: Comment on PR
if: steps.levitate-run.outputs.exit_code == 1
uses: marocchino/sticky-pull-request-comment@v2
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728
with:
header: levitate-breaking-change-comment
number: ${{ github.event.pull_request.number }}
@@ -255,7 +263,7 @@ jobs:
# Remove comment from the PR (no more breaking changes)
- name: Remove comment from PR
if: steps.levitate-run.outputs.exit_code == 0
uses: marocchino/sticky-pull-request-comment@v2
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728
with:
header: levitate-breaking-change-comment
number: ${{ github.event.pull_request.number }}