add editors #155
This file contains hidden or 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: Validate TEI documents | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "tei/*.xml" | |
| push: | |
| branches: [main] | |
| paths: | |
| - "tei/*.xml" | |
| permissions: | |
| contents: read | |
| jobs: | |
| validate_tei: | |
| runs-on: ubuntu-latest | |
| name: Validate TEI files | |
| steps: | |
| # We need to checkout with fetch-depth 0 or 2 for push events; | |
| # see https://github.com/tj-actions/changed-files?tab=readme-ov-file#usage- | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| if: github.event_name == 'push' | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| if: github.event_name != 'push' | |
| - name: Get changed files | |
| id: changed-tei-files | |
| uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 #v47.0.0 | |
| if: github.event_name == 'push' || github.event_name == 'pull_request' | |
| with: | |
| files: | | |
| tei/*.xml | |
| - name: Get changed files | |
| id: all-tei-files | |
| if: github.event_name == 'workflow_dispatch' | |
| run: echo 'files=tei/*.xml' >> $GITHUB_OUTPUT | |
| - name: Validate against TEI-All schema | |
| uses: dracor-org/dracor-validate-action@ef4e7dbdb6eda6f8bd08d7aaf79733399782818f # v2.0.4 | |
| with: | |
| files: | | |
| ${{ steps.changed-tei-files.outputs.all_changed_files }} | |
| ${{ steps.all-tei-files.outputs.files }} | |
| - name: Validate against DraCor schema | |
| uses: dracor-org/dracor-validate-action@ef4e7dbdb6eda6f8bd08d7aaf79733399782818f # v2.0.4 | |
| with: | |
| files: | | |
| ${{ steps.changed-tei-files.outputs.all_changed_files }} | |
| ${{ steps.all-tei-files.outputs.files }} | |
| schema: dracor | |
| warn-only: yes |