-
Notifications
You must be signed in to change notification settings - Fork 30
43 lines (38 loc) · 1.06 KB
/
nomad-lint.yml
File metadata and controls
43 lines (38 loc) · 1.06 KB
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
name: Lint Nomad files
on:
workflow_dispatch:
pull_request:
branches:
- master
paths:
- services/nomad/**.nomad
push:
branches:
- master
paths:
- services/nomad/**.nomad
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint Nomad files
runs-on: ubuntu-latest
container:
image: ghcr.io/void-linux/void-glibc
steps:
- name: Prepare container
run: |
xbps-install -Syu xbps && xbps-install -y void-repo-nonfree && \
xbps-install -Syu && xbps-install -y nomad bash git
- name: Checkout repo
uses: classabbyamp/treeless-checkout-action@v1
- name: Run Lints
run: |
rv=0
printf "\033[1m=> Checking formatting of nomad files\033[0m\n"
nomad fmt -check -recursive services/nomad || rv=1
if [ "$rv" -ne 0 ]; then
printf "\033[1m=> Some nomad files need formatting! Run 'nomad fmt' on the listed files. \033[0m\n"
fi
exit "$rv"