Skip to content

Commit 395cfc7

Browse files
authored
Merge pull request #2715 from vincepri/improve-dep-version
🌱 Improve github actions dependencies versions and permissions
2 parents 2831a3d + c62ab1a commit 395cfc7

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

Diff for: .github/workflows/golangci-lint.yml

+13-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ on:
44
types: [opened, edited, synchronize, reopened]
55
branches:
66
- main
7+
8+
permissions:
9+
# Required: allow read access to the content for analysis.
10+
contents: read
11+
# Optional: allow read access to pull request. Use with `only-new-issues` option.
12+
pull-requests: read
13+
# Optional: Allow write access to checks to allow the action to annotate code in the PR.
14+
checks: write
15+
716
jobs:
817
golangci:
918
name: lint
@@ -14,13 +23,15 @@ jobs:
1423
- ""
1524
- tools/setup-envtest
1625
steps:
17-
- uses: actions/setup-go@v5
26+
- name: Set up Go
27+
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # tag=v5.0.0
1828
with:
1929
go-version: '1.21'
2030
cache: false
2131
- uses: actions/checkout@v4
2232
- name: golangci-lint
23-
uses: golangci/golangci-lint-action@v4
33+
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # tag=v4.0.0
2434
with:
2535
version: v1.56.2
36+
args: --out-format=colored-line-number
2637
working-directory: ${{matrix.working-directory}}

Diff for: .github/workflows/pr-dependabot.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Check out code
22-
uses: actions/checkout@v4 # tag=v3.5.3
22+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1
2323
- name: Set up Go
2424
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # tag=v5.0.0
2525
with:

Diff for: .github/workflows/verify.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ on:
22
pull_request_target:
33
types: [opened, edited, reopened, synchronize]
44

5+
permissions:
6+
checks: write # Allow access to checks to write check runs.
7+
58
jobs:
69
verify:
710
runs-on: ubuntu-latest
811
name: verify PR contents
912
steps:
1013
- name: Verifier action
1114
id: verifier
12-
uses: kubernetes-sigs/[email protected]
15+
uses: kubernetes-sigs/kubebuilder-release-tools@012269a88fa4c034a0acf1ba84c26b195c0dbab4 # tag=v0.4.3
1316
with:
1417
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)