-
Notifications
You must be signed in to change notification settings - Fork 14
55 lines (54 loc) · 1.81 KB
/
reviewdog.yaml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: reviewdog
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
jobs:
reviewdog:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Install golangci-lint
run: |
mkdir -p ./bin
sudo curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./bin v1.51.2
- name: Install shellcheck
run: |
sudo apt install shellcheck
- name: Install bandit
run: |
pip install bandit && bandit --version
- name: Install pep8
run: |
sudo apt install pep8
- name: Install hadolint
env:
HADOLINT_VERSION: v1.16.3
run: |
wget -q https://github.com/hadolint/hadolint/releases/download/$HADOLINT_VERSION/hadolint-Linux-x86_64 -O ./bin/hadolint \
&& chmod +x ./bin/hadolint
- name: Install reviewdog
run: |
curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s
- name: Run Reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REVIEWDOG_FAIL_ON_ERROR: 'true'
run: |
mkdir -p "$PWD"/scan_results
./bin/reviewdog -conf .github/.reviewdogConfig.yml -reporter=github-pr-check
- uses: actions/upload-artifact@v3
with:
name: scan_results
path: ${{ github.workspace }}/scan_results/