-
Notifications
You must be signed in to change notification settings - Fork 50
40 lines (34 loc) · 1.08 KB
/
reformat-xml.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
# Add .github/workflows/reformat-xml.yml
---
name: Reformat XML
on:
push:
paths:
- "xml/*.xml"
- "*.xml"
jobs:
reformat-xml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Number of commits to fetch. See above.
fetch-depth: 0
- name: Format XML
id: dbxml
uses: tomschr/xml-format-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
config: https://raw.githubusercontent.com/SUSE/doc-ses/331efaec270a54f4353865128ca0702b5e45791e/docbook-xmlformat.conf
exclude-files: |
xml/common_copyright_cc.xml
xml/common_intro_convention.xml
xml/common_intro_feedback.xml
xml/common_intro_support.xml
- name: Push
if: ${{ steps.dbxml.outputs.xmlfound }}
run: |
# Remove any refs/heads/ parts:
BRANCH="${GITHUB_REF#refs/heads/}"
URL="https://${{github.actor}}:${{secrets.GITHUB_TOKEN}}@github.com/${{github.repository}}.git"
git push "$URL" "$BRANCH"