From 895ccc81377d439290b91c279ec59dc08aea7f90 Mon Sep 17 00:00:00 2001 From: Roxedus Date: Fri, 1 May 2020 18:29:49 +0200 Subject: [PATCH] Update action --- .github/workflows/xmllint.yml | 39 ++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/.github/workflows/xmllint.yml b/.github/workflows/xmllint.yml index 083d0bd..1dc1a7a 100644 --- a/.github/workflows/xmllint.yml +++ b/.github/workflows/xmllint.yml @@ -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;