generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (59 loc) · 1.66 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
63
64
name: Check
# Build, test and analyse source code before merging
on:
push:
branches-ignore:
- main
jobs:
build:
name: Build
uses: ./.github/workflows/build.yml
secrets:
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
post-build:
name: Post-build
runs-on: ubuntu-latest
needs: build
if: always()
steps:
- name: Check build matrix status
run: if [ "${{ needs.build.result }}" = "success" ]; then exit 0; else exit 1; fi
analyse:
name: Analyse
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/analyse
with:
sonar-token: ${{ secrets.SONAR_TOKEN }}
gradle-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
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 }}