Skip to content

build(deps): bump actions/checkout from 3.6.0 to 4.0.0 (#32) #149

build(deps): bump actions/checkout from 3.6.0 to 4.0.0 (#32)

build(deps): bump actions/checkout from 3.6.0 to 4.0.0 (#32) #149

Workflow file for this run

---
name: Lint CI
"on":
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: read
jobs:
changes:
name: Filter changes
runs-on: ubuntu-latest
outputs:
scripts: ${{ steps.filter.outputs.scripts }}
playbooks: ${{ steps.filter.outputs.playbooks }}
steps:
- name: checkout project
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50
id: filter
with:
filters: |
scripts:
- '**/.local/bin/*'
playbooks:
- 'ansible/.ansible/**'
lint-shell:
name: Lint scripts
needs: changes
if: ${{ needs.changes.outputs.scripts == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- name: Shellcheck scripts
run: |
find * -type f -executable -exec shellcheck {} \;
lint-playbook:
name: Lint playbooks
needs: changes
if: ${{ needs.changes.outputs.playbooks == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
- name: Setup some envs
run: |
echo "HOME=$HOME" >> $GITHUB_ENV
echo "PATH=$PATH:$HOME/.local/bin" >> $GITHUB_ENV
echo "ansible_dwm=ansible/.ansible/dwm/" >> $GITHUB_ENV
- name: Install requirements-dev.txt
run: |
cd $ansible_dwm
python -m pip install -r requirements-dev.txt
- name: Check ansible version
run: |
ansible --version
ansible-lint --version
- name: Install requirements.yml
run: |
cd $ansible_dwm
ansible-galaxy collection install -r requirements.yml
- name: Run yaml-lint
run: |
cd $ansible_dwm
yamllint .
- name: Run playbook syntax-check
run: |
cd $ansible_dwm
ansible-playbook --syntax-check dwm.yml
ansible-playbook --syntax-check update.yml
- name: Run ansible-lint
run: |
cd $ansible_dwm
ansible-lint