mirror of
https://github.com/LukeHagar/unRAID-CA-templates.git
synced 2025-12-06 04:21:55 +00:00
Update action
This commit is contained in:
39
.github/workflows/xmllint.yml
vendored
39
.github/workflows/xmllint.yml
vendored
@@ -1,24 +1,29 @@
|
||||
name: Linter
|
||||
|
||||
on: [push, pull_request]
|
||||
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;
|
||||
- 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;
|
||||
|
||||
Reference in New Issue
Block a user