Raffaele Di Fazio 109fd6559f
Pin all GitHub Actions to commit SHAs per Kubernetes policy (#6316)
Pin all uses: references in workflow files to 40-character commit
SHA hashes instead of mutable tags, as required by the Kubernetes
GitHub Actions security policy.

Actions pinned:
- actions/setup-go v6.3.0
- actions/setup-python v6
- actions/checkout v6
- coverallsapp/github-action v2
- github/codeql-action v4
- golangci/golangci-lint-action v9
- GrantBirki/json-yaml-validate v4.0.0
- nosborn/github-action-markdown-cli v3.5.0
- pre-commit/action v3.0.1
- renovatebot/github-action v46.1.4
2026-03-27 20:14:47 +05:30

54 lines
1.6 KiB
YAML

name: Lint
on:
pull_request:
branches: [ master ]
jobs:
lint:
name: Markdown and Go
runs-on: ubuntu-latest
permissions:
# Required: allow read access to the content for analysis.
contents: read
# For go lang linter
pull-requests: read
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Lint markdown
uses: nosborn/github-action-markdown-cli@508d6cefd8f0cc99eab5d2d4685b1d5f470042c1 # v3.5.0
with:
files: '.'
config_file: ".markdownlint.json"
- name: Set up Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
- name: Go formatting
run: |
if [ -z "$(gofmt -l .)" ]; then
echo -e "All '*.go' files are properly formatted."
else
echo -e "Please run 'make go-lint' to fix. Some files need formatting:"
gofmt -d -l .
exit 1
fi
# https://github.com/golangci/golangci-lint-action?tab=readme-ov-file#verify
- name: Verify linter configuration and Lint go code
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9
with:
verify: true
args: --timeout=30m
version: v2.7
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
# https://github.com/pre-commit/action
- name: Verify with pre-commit
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1