Skip to content

Commit 7a07d42

Browse files
authored
Merge branch 'master' into chore_disable_leader_election_in_kustomize
2 parents d780c17 + 88f7b73 commit 7a07d42

13 files changed

+106
-375
lines changed

.github/dependabot.yml

-10
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,3 @@ updates:
2020
update-types:
2121
- minor
2222
- patch
23-
24-
- package-ecosystem: "gomod"
25-
directory: "/api"
26-
schedule:
27-
interval: "weekly"
28-
groups:
29-
gomod:
30-
update-types:
31-
- minor
32-
- patch

.github/workflows/e2e.yaml

+12-15
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,21 @@ env:
99
NAME: grafana-operator
1010
NAMESPACE: grafana-operator-system
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
docs_only_check:
1417
name: Check for docs-only change
1518
runs-on: ubuntu-latest
16-
permissions:
17-
contents: read
1819
outputs:
1920
docs_only: ${{ steps.docs_only_check.outputs.docs_only }}
2021
steps:
2122
- name: Check out code
22-
uses: actions/checkout@v4
23+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2324
with:
2425
fetch-depth: 0
26+
persist-credentials: false
2527

2628
- id: changed-files
2729
name: Get changed files
@@ -32,13 +34,6 @@ jobs:
3234
**/*.html
3335
hugo/**
3436
35-
- id: which_files
36-
name: Which files was changed
37-
run: |
38-
echo "One or more files has changed."
39-
echo "List all the files that have changed: ${{ steps.changed-files.outputs.all_changed_files }}"
40-
echo "What is any changed ${{ steps.changed-files.outputs.any_changed }}"
41-
4237
- id: docs_only_check
4338
if: steps.changed-files.outputs.any_changed != 'true'
4439
name: Check for docs-only changes
@@ -61,29 +56,31 @@ jobs:
6156
- v1.32.2
6257
steps:
6358
- name: Clone repo and checkout
64-
uses: actions/checkout@v4
59+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
60+
with:
61+
persist-credentials: false
6562

6663
- name: Install go
67-
uses: actions/setup-go@v5
64+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
6865
with:
6966
go-version-file: "go.mod"
7067
cache: true
7168

7269
- name: Install ko
73-
uses: ko-build/[email protected]
70+
uses: ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9
7471
with:
7572
version: v0.16.0
7673

7774
- name: Install chainsaw
78-
uses: kyverno/[email protected]
75+
uses: kyverno/action-install-chainsaw@f2b47b97dc889c12702113753d713f01ec268de5 # v0.2.12
7976

8077
- name: Create KinD cluster ${{ matrix.version }}
8178
id: kind
8279
run: |
8380
kind --kubeconfig="${KUBECONFIG}" create cluster --image=kindest/node:${{ matrix.version }} --config tests/e2e/kind.yaml
8481
8582
- name: Install kubectl
86-
uses: azure/setup-kubectl@v4
83+
uses: azure/setup-kubectl@3e0aec4d80787158d308d7b364cb1b702e7feb7f # v4
8784
with:
8885
version: ${{ matrix.version }}
8986

.github/workflows/hugo.yaml

+12-9
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ on:
99
workflow_dispatch:
1010

1111
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12-
permissions:
13-
contents: read
14-
pages: write
15-
id-token: write
1612

1713
# Allow one concurrent deployment
1814
concurrency:
@@ -27,6 +23,8 @@ defaults:
2723
jobs:
2824
# Build job
2925
build:
26+
permissions:
27+
contents: read
3028
runs-on: ubuntu-latest
3129
env:
3230
HUGO_VERSION: 0.134.3
@@ -42,15 +40,17 @@ jobs:
4240
&& tar -xvf ${{ runner.temp }}/dart-sass.tar.gz -C ${{ runner.temp }}/ \
4341
&& echo "${{ runner.temp }}/dart-sass" >> $GITHUB_PATH
4442
- name: Checkout
45-
uses: actions/checkout@v4
43+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
44+
with:
45+
persist-credentials: true
4646
- name: Setup Pages
4747
id: pages
48-
uses: actions/configure-pages@v5
48+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
4949
- name: Install Node.js dependencies
5050
run: |
5151
cd hugo
5252
[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true
53-
- name: Build with Hugo
53+
- name: Build with Hugo # zizmor: ignore[template-injection] configure-pages considered safe
5454
env:
5555
# For maximum backward compatibility with Hugo modules
5656
HUGO_ENVIRONMENT: production
@@ -62,12 +62,15 @@ jobs:
6262
--minify \
6363
--baseURL "${{ steps.pages.outputs.base_url }}/"
6464
- name: Upload artifact
65-
uses: actions/upload-pages-artifact@v3
65+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
6666
with:
6767
path: ./hugo/public
6868

6969
# Deployment job
7070
deploy:
71+
permissions:
72+
pages: write
73+
id-token: write
7174
environment:
7275
name: github-pages
7376
url: ${{ steps.deployment.outputs.page_url }}
@@ -76,4 +79,4 @@ jobs:
7679
steps:
7780
- name: Deploy to GitHub Pages
7881
id: deployment
79-
uses: actions/deploy-pages@v4
82+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4

.github/workflows/labeler.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "Pull Request Labeler"
2-
on:
2+
on: # zizmor: ignore[dangerous-triggers] pull_request target used here as per recommendation from GitHub in actions/labeler
33
- pull_request_target
44

55
jobs:
@@ -9,4 +9,4 @@ jobs:
99
pull-requests: write
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/labeler@v5
12+
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5

.github/workflows/pr-hugo.yaml

+8-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ defaults:
77
run:
88
shell: bash
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
# Build job
1215
build:
@@ -25,15 +28,17 @@ jobs:
2528
&& tar -xvf ${{ runner.temp }}/dart-sass.tar.gz -C ${{ runner.temp }}/ \
2629
&& echo "${{ runner.temp }}/dart-sass" >> $GITHUB_PATH
2730
- name: Checkout
28-
uses: actions/checkout@v4
31+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
32+
with:
33+
persist-credentials: false
2934
- name: Setup Pages
3035
id: pages
31-
uses: actions/configure-pages@v5
36+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
3237
- name: Install Node.js dependencies
3338
run: |
3439
cd hugo
3540
[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true
36-
- name: Build with Hugo
41+
- name: Build with Hugo # zizmor: ignore[template-injection] configure-pages considered safe
3742
env:
3843
# For maximum backward compatibility with Hugo modules
3944
HUGO_ENVIRONMENT: production

.github/workflows/pr-validation.yaml

+27-21
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,34 @@ jobs:
1111
pre-commit:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
15+
with:
16+
persist-credentials: false
1517

16-
- uses: actions/setup-python@v5
18+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
1719
with:
1820
python-version: "3.13"
1921

20-
- uses: pre-commit/[email protected]
22+
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
2123

2224
go-lint:
2325
runs-on: ubuntu-latest
2426
steps:
2527
- name: Clone repo
26-
uses: actions/checkout@v4
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
29+
with:
30+
persist-credentials: false
2731

2832
- name: Setup go
29-
uses: actions/setup-go@v5
33+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
3034
with:
3135
go-version-file: "go.mod"
3236

33-
- name: golangci-lint (root module)
34-
uses: golangci/[email protected]
37+
- name: golangci-lint
38+
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
3539
with:
3640
version: v2.0.2
3741

38-
- name: golangci-lint (api module)
39-
uses: golangci/[email protected]
40-
with:
41-
install-mode: none
42-
working-directory: api
43-
4442
- name: Verify golangci-lint config
4543
run: |
4644
golangci-lint config verify
@@ -49,10 +47,12 @@ jobs:
4947
runs-on: ubuntu-latest
5048
steps:
5149
- name: Clone repo
52-
uses: actions/checkout@v4
50+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
51+
with:
52+
persist-credentials: false
5353

5454
- name: Setup go
55-
uses: actions/setup-go@v5
55+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
5656
with:
5757
go-version-file: "go.mod"
5858

@@ -72,10 +72,12 @@ jobs:
7272
runs-on: ubuntu-latest
7373
steps:
7474
- name: Clone repo
75-
uses: actions/checkout@v4
75+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
76+
with:
77+
persist-credentials: false
7678

7779
- name: Setup go
78-
uses: actions/setup-go@v5
80+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
7981
with:
8082
go-version-file: "go.mod"
8183

@@ -102,10 +104,12 @@ jobs:
102104
runs-on: ubuntu-latest
103105
steps:
104106
- name: Clone repo
105-
uses: actions/checkout@v4
107+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
108+
with:
109+
persist-credentials: false
106110

107111
- name: Setup go
108-
uses: actions/setup-go@v5
112+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
109113
with:
110114
go-version-file: "go.mod"
111115

@@ -123,10 +127,12 @@ jobs:
123127
runs-on: ubuntu-latest
124128
steps:
125129
- name: Clone repo
126-
uses: actions/checkout@v4
130+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
131+
with:
132+
persist-credentials: false
127133

128134
- name: Run Trivy vulnerability scanner
129-
uses: aquasecurity/trivy-action@master
135+
uses: aquasecurity/trivy-action@99baf0d8b4e787c3cfd7b602664c8ce60a43cd38 # master
130136
with:
131137
scan-type: "fs"
132138
scan-ref: "."

0 commit comments

Comments
 (0)