-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (51 loc) · 1.79 KB
/
validation.yml
File metadata and controls
58 lines (51 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: github.event_name == 'push'
with:
fetch-depth: 0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: github.event_name != 'push'
- name: Get changed files
id: changed-tei-files
uses: tj-actions/changed-files@7dee1b0c1557f278e5c7dc244927139d78c0e22a #v47.0.4
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@bf3d565b8af9d7cb5d3a0a2cb21ebac68f85eb33 # v2.3.0
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@bf3d565b8af9d7cb5d3a0a2cb21ebac68f85eb33 # v2.3.0
with:
files: |
${{ steps.changed-tei-files.outputs.all_changed_files }}
${{ steps.all-tei-files.outputs.files }}
schema: dracor
warn-only: yes