-
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 1.25 KB
/
pr-check.yml
File metadata and controls
36 lines (29 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
name: PR - Check
on:
pull_request:
permissions:
contents: read
pull-requests: read
jobs:
lint:
name: Run on Ubuntu
runs-on: ubuntu-latest
steps:
- name: Install pre-commit
run: sudo apt-get update -y && sudo apt-get install -y pre-commit codespell gitleaks
- name: Install golangci/golangci-lint
run: |
export GOLANGCI_LINT_VERSION=2.6.2
curl -sSLO "https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_LINT_VERSION}/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz"
tar -xzf golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz -C /tmp
mv /tmp/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64/golangci-lint /usr/local/bin/golangci-lint
rm -rf /tmp/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64* golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz
- name: Clone the code
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
- name: Setup Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6
with:
go-version-file: go.mod
- name: Check commits
run: pre-commit run --hook-stage manual --all-files