Skip to content

.github/workflows: add workflows for linting nomad and terraform formatting #2

.github/workflows: add workflows for linting nomad and terraform formatting

.github/workflows: add workflows for linting nomad and terraform formatting #2

Workflow file for this run

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
- name: Checkout repo
uses: classabbyamp/treeless-checkout-action@v1
- name: Run Lints
run: |
rv=0
echo "\e[1m=> Checking formatting of nomad files"
nomad fmt -check -recursive services/nomad || rv=1
exit "$rv"