This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
---
|
||||
name: lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
shell-yaml-ansible:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install lint tools
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y shellcheck yamllint python3-pip
|
||||
python3 -m pip install --user ansible-lint
|
||||
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: ShellCheck Bash scripts
|
||||
run: |
|
||||
find infra-run/scripts/bash -name '*.sh' -print0 | xargs -0 shellcheck -x \
|
||||
-P infra-run/scripts/bash/disk-full \
|
||||
-P infra-run/scripts/bash/gpfs \
|
||||
-P infra-run/scripts/bash/veritas
|
||||
|
||||
- name: yamllint
|
||||
run: yamllint .
|
||||
|
||||
- name: ansible-lint
|
||||
continue-on-error: true
|
||||
run: cd infra-run/ansible && ansible-lint playbooks roles
|
||||
Reference in New Issue
Block a user