Merge pull request #535 from mcteo/patch-1 #1162
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: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v43 | |
with: | |
files: | | |
templates/*.xml | |
templates/deprecated/*.xml | |
- name: Run linter | |
run: | | |
sudo apt-get update -q && sudo apt-get install -qy libxml2-utils | |
xmllint ${{ steps.changed-files.outputs.all_changed_files }} | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Run template check | |
shell: bash | |
run: python .github/scripts/check.py --files ${{ steps.changed-files.outputs.all_changed_files }} |