-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) · 1.69 KB
/
pr-lint.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
56
57
58
name: "Lint Pull Request"
on: # yamllint disable-line rule:truthy
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
- "releases/**"
paths:
- "!**/vendor/**"
- "**.go"
- "**go.mod"
- "**go.sum"
- ".github/actions/**/*"
- ".github/workflows/pr-*"
- "!**/vendor/**"
- docs/**
# yamllint disable rule:line-length
jobs:
pr-lint:
name: "Lint Pull Request"
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-latest
container:
image: ghcr.io/sovereigncloudstack/cspo-builder:0.1.0
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Fixup git permissions
# https://github.com/actions/checkout/issues/766
shell: bash
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Verify Golang Modules
run: make BUILD_IN_CONTAINER=false generate-modules-ci
- name: Verify Release
run: make BUILD_IN_CONTAINER=false test-release
- name: Link Checker
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: make BUILD_IN_CONTAINER=false lint-links
- name: Lint YAML
run: make BUILD_IN_CONTAINER=false lint-yaml-ci
- name: Lint Dockerfile
run: make BUILD_IN_CONTAINER=false lint-dockerfile
- name: Lint Golang Code
run: make BUILD_IN_CONTAINER=false lint-golang-ci