File tree Expand file tree Collapse file tree 2 files changed +86
-0
lines changed
Expand file tree Collapse file tree 2 files changed +86
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Lint Nomad files
2+ on :
3+ workflow_dispatch :
4+ pull_request :
5+ branches :
6+ - master
7+ paths :
8+ - services/nomad/**.nomad
9+ push :
10+ branches :
11+ - master
12+ paths :
13+ - services/nomad/**.nomad
14+
15+ concurrency :
16+ group : ${{ github.workflow }}-${{ github.ref }}
17+ cancel-in-progress : true
18+
19+ jobs :
20+ lint :
21+ name : Lint Nomad files
22+ runs-on : ubuntu-latest
23+ container :
24+ image : ghcr.io/void-linux/void-glibc
25+ steps :
26+ - name : Prepare container
27+ run : |
28+ xbps-install -Syu xbps && xbps-install -y void-repo-nonfree && \
29+ xbps-install -Syu && xbps-install -y nomad bash git
30+
31+ - name : Checkout repo
32+ uses : classabbyamp/treeless-checkout-action@v1
33+
34+ - name : Run Lints
35+ run : |
36+ rv=0
37+ printf "\033[1m=> Checking formatting of nomad files\033[0m\n"
38+ nomad fmt -check -recursive services/nomad || rv=1
39+ if [ "$rv" -ne 0 ]; then
40+ printf "\033[1m=> Some nomad files need formatting! Run 'nomad fmt' on the listed files. \033[0m\n"
41+ fi
42+ exit "$rv"
43+
Original file line number Diff line number Diff line change 1+ name : Lint Terraform files
2+ on :
3+ workflow_dispatch :
4+ pull_request :
5+ branches :
6+ - master
7+ paths :
8+ - terraform/**.tf
9+ push :
10+ branches :
11+ - master
12+ paths :
13+ - terraform/**.tf
14+
15+ concurrency :
16+ group : ${{ github.workflow }}-${{ github.ref }}
17+ cancel-in-progress : true
18+
19+ jobs :
20+ lint :
21+ name : Lint Terraform files
22+ runs-on : ubuntu-latest
23+ container :
24+ image : ghcr.io/void-linux/void-glibc
25+ steps :
26+ - name : Prepare container
27+ run : |
28+ xbps-install -Syu xbps && xbps-install -y void-repo-nonfree && \
29+ xbps-install -Syu && xbps-install -y terraform bash git
30+
31+ - name : Checkout repo
32+ uses : classabbyamp/treeless-checkout-action@v1
33+
34+ - name : Run Lints
35+ run : |
36+ rv=0
37+ printf "\033[1m=> Checking formatting of terraform files\033[0m\n"
38+ terraform fmt -check -recursive terraform || rv=1
39+ if [ "$rv" -ne 0 ]; then
40+ printf "\033[1m=> Some terraform files need formatting! Run 'terraform fmt' on the listed files. \033[0m\n"
41+ fi
42+ exit "$rv"
43+
You can’t perform that action at this time.
0 commit comments