-
Notifications
You must be signed in to change notification settings - Fork 214
53 lines (46 loc) · 1.63 KB
/
generate-xsd.yml
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
name: Flux Schema Generation
on:
workflow_dispatch:
push:
branches:
- development
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Checkout Flux project
uses: actions/checkout@v3
with:
path: flux
persist-credentials: false
- name: Install Schema Generator
working-directory: ./flux
run: |
composer require -n -o --no-progress typo3/fluid-schema-generator "^2.1"
- name: Install XML Linter
working-directory: ./flux
run: |
sudo apt install libxml2-utils
- name: Generate Schemata
working-directory: ./flux
run: |
mkdir -p ../schemas/fluidtypo3/flux/latest
./vendor/bin/generateschema FluidTYPO3\\\Flux > ../schemas/fluidtypo3/flux/latest/schema.xsd
- name: Compare and Commit if changed
working-directory: ./flux
continue-on-error: true
run: |
if [[ `diff ../schemas/fluidtypo3/flux/latest/schema.xsd ./Resources/Private/Schemas/Flux.xsd` != "" ]]; then
xmllint --format ../schemas/fluidtypo3/flux/latest/schema.xsd > ./Resources/Private/Schemas/Flux.xsd
git config user.name "FluidTYPO3 Flux"
git config user.email "claus@namelesscoder.net"
git add ./Resources/Private/Schemas/Flux.xsd
git commit -m '[TASK] Update XSD schema'
git push https://${{ secrets.EXEMPT_PUSH_TOKEN }}@github.com/FluidTYPO3/flux HEAD:development
fi