generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (57 loc) · 1.49 KB
/
check.yml
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
59
60
61
62
name: Check
# Build, test and analyse source code before merging
on:
push:
branches-ignore:
- main
jobs:
build:
name: Build
uses: ./.github/workflows/build.yml
post-build:
name: Post-build
runs-on: ubuntu-latest
needs: build
if: always()
steps:
- name: Check build matrix status
if: ${{ needs.build.result != 'success' }}
run: exit 1
analyse:
name: Analyse
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/analyse
with:
token: ${{ secrets.SONAR_TOKEN }}
lint:
name: Lint
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
statuses: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Lint changes
uses: github/super-linter/slim@v7
env:
DEFAULT_BRANCH: main
VALIDATE_ALL_CODEBASE: false # changes only
VALIDATE_BASH: true
VALIDATE_BASH_EXEC: true
VALIDATE_DOCKERFILE_HADOLINT: true
VALIDATE_GITHUB_ACTIONS: true
VALIDATE_RUBY: true
VALIDATE_XML: true
VALIDATE_YAML: true
LINTER_RULES_PATH: /
FILTER_REGEX_EXCLUDE: .*templates/.*.ya?ml
BASH_SEVERITY: warning
GITHUB_ACTIONS_CONFIG_FILE: .github/actionlint.yml
GITHUB_ACTIONS_COMMAND_ARGS: -ignore=SC.+:info:.+
GITHUB_TOKEN: ${{ github.token }}