-
Notifications
You must be signed in to change notification settings - Fork 160
57 lines (54 loc) · 1.42 KB
/
scripts-lint.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
name: Script linters
# Cancel workflow if there is a new change to the branch.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
on:
merge_group:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run shellcheck
uses: ludeeus/[email protected]
env:
SHELLCHECK_OPTS: --external-sources --source-path=SCRIPTDIR
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- name: Run rubocop
run: |
gem install rubocop -v 1.58 --no-document
rubocop scripts/
docker-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: validate compose file
run: docker-compose -f monitoring/docker-compose.yml config
- uses: hadolint/[email protected]
with:
dockerfile: "Dockerfile*"
recursive: true
# https://github.com/hadolint/hadolint/wiki/DL3008
# https://github.com/hadolint/hadolint/wiki/DL3018
ignore: DL3008,DL3018
markdown-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
yarn install
yarn run md-check