|
| 1 | +################################################################################ |
| 2 | +# This file is AUTOGENERATED with <https://github.com/sapcc/go-makefile-maker> # |
| 3 | +# Edit Makefile.maker.yaml instead. # |
| 4 | +################################################################################ |
| 5 | + |
| 6 | +# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company |
| 7 | +# SPDX-License-Identifier: Apache-2.0 |
| 8 | + |
1 | 9 | name: Checks |
2 | | -on: |
| 10 | +"on": |
3 | 11 | push: |
4 | | - tags: |
5 | | - - v* |
6 | 12 | branches: |
7 | 13 | - main |
8 | 14 | pull_request: |
9 | | - |
| 15 | + branches: |
| 16 | + - '*' |
| 17 | + workflow_dispatch: {} |
10 | 18 | permissions: |
11 | 19 | checks: write |
12 | 20 | contents: read |
13 | | - |
14 | 21 | jobs: |
15 | 22 | checks: |
16 | 23 | name: Checks |
17 | 24 | runs-on: ubuntu-latest |
18 | 25 | steps: |
19 | 26 | - name: Check out code |
20 | | - uses: actions/checkout@v4 |
| 27 | + uses: actions/checkout@v5 |
21 | 28 | - name: Set up Go |
22 | | - uses: actions/setup-go@v5 |
23 | | - with: |
24 | | - go-version-file: 'go.mod' |
25 | | - - run: go mod edit -json | jq -r .Go | echo "GO_VERSION_FROM_PROJECT=$(cut -d' ' -f2)" >>${GITHUB_ENV} |
26 | | - - name: Dependency Review |
27 | | - uses: actions/dependency-review-action@v4 |
| 29 | + uses: actions/setup-go@v6 |
28 | 30 | with: |
29 | | - base-ref: ${{ github.event.pull_request.base.sha || 'main' }} |
30 | | - deny-licenses: AGPL-1.0, AGPL-3.0, GPL-1.0, GPL-2.0, GPL-3.0, LGPL-2.0, LGPL-2.1, LGPL-3.0, BUSL-1.1 |
31 | | - fail-on-severity: moderate |
32 | | - head-ref: ${{ github.event.pull_request.head.sha || github.ref }} |
33 | | - - name: Run govulncheck |
34 | | - uses: golang/govulncheck-action@v1 |
| 31 | + check-latest: true |
| 32 | + go-version: 1.25.3 |
| 33 | + - name: Run golangci-lint |
| 34 | + uses: golangci/golangci-lint-action@v8 |
35 | 35 | with: |
36 | | - go-version-input: "${{ env.GO_VERSION_FROM_PROJECT }}" |
| 36 | + version: latest |
| 37 | + - name: Delete pre-installed shellcheck |
| 38 | + run: sudo rm -f $(which shellcheck) |
| 39 | + - name: Run shellcheck |
| 40 | + run: make run-shellcheck |
| 41 | + - name: Dependency Licenses Review |
| 42 | + run: make check-dependency-licenses |
37 | 43 | - name: Check for spelling errors |
38 | 44 | uses: reviewdog/action-misspell@v1 |
39 | 45 | with: |
| 46 | + exclude: ./vendor/* |
40 | 47 | fail_on_error: true |
41 | 48 | github_token: ${{ secrets.GITHUB_TOKEN }} |
42 | 49 | ignore: importas |
43 | 50 | reporter: github-check |
44 | 51 | - name: Check if source code files have license header |
45 | | - run: | |
46 | | - shopt -s globstar |
47 | | - go install github.com/google/addlicense@latest |
48 | | - addlicense --check -- **/*.go |
| 52 | + run: make check-addlicense |
| 53 | + - name: REUSE Compliance Check |
| 54 | + uses: fsfe/reuse-action@v6 |
| 55 | + - name: Install govulncheck |
| 56 | + run: go install golang.org/x/vuln/cmd/govulncheck@latest |
| 57 | + - name: Run govulncheck |
| 58 | + run: govulncheck -format text ./... |
0 commit comments