feat:Siteinspector Template #1012
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linter | |
on: | |
push: | |
paths: | |
- "templates/*.xml" | |
pull_request: | |
paths: | |
- "templates/*.xml" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Prep Enviroment | |
run: sudo apt-get update -q && sudo apt-get install -qy libxml2-utils | |
- name: Run linter | |
env: | |
sha: ${{ github.sha }} | |
run: | | |
for file in $(git diff-tree --no-commit-id --name-only -r $sha ); do | |
if [[ ${file} == *.xml ]] && [[ -f ${file} ]] | |
then | |
xmllint $file | |
fi | |
done; |