From eeac834f189143729cd65f5bff42069b65c5d8ad Mon Sep 17 00:00:00 2001 From: Ero <56401411+just-ero@users.noreply.github.com> Date: Thu, 28 Sep 2023 10:36:53 +0200 Subject: [PATCH] Create CI job to format `LiveSplit.AutoSplitters.xml` --- .github/workflows/format-xml.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/format-xml.yml diff --git a/.github/workflows/format-xml.yml b/.github/workflows/format-xml.yml new file mode 100644 index 000000000..a57af798b --- /dev/null +++ b/.github/workflows/format-xml.yml @@ -0,0 +1,28 @@ +name: Format XML File + +on: + pull_request: + types: [closed] + paths: + - 'LiveSplit.AutoSplitters.xml' + +jobs: + format: + if: github.event.pull_request.merged == true + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Format .xml file with yq + uses: mikefarah/yq@v4.35.2 + with: + cmd: yq -i -ox -I4 '.' LiveSplit.AutoSplitters.xml + + - name: Commit changes + uses: EndBug/add-and-commit@v9.1.3 + with: + author_name: github-actions + author_email: 41898282+github-actions[bot]@users.noreply.github.com + message: Automatic formatting of XML