doc-kit run (fetch updates) #307
Workflow file for this run
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
# 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" | |