From 9976716511dfa8b26718f214ac1aa9d4256e25fc Mon Sep 17 00:00:00 2001 From: "Arend-Jan van Hilten (TU)" Date: Wed, 25 Oct 2023 14:23:35 +0200 Subject: [PATCH] Add yamlfmt --- .github/workflows/yamlfmt.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/yamlfmt.yml diff --git a/.github/workflows/yamlfmt.yml b/.github/workflows/yamlfmt.yml new file mode 100644 index 00000000..bb326f6b --- /dev/null +++ b/.github/workflows/yamlfmt.yml @@ -0,0 +1,28 @@ +name: test-yaml-format +on: [push, pull_request] +jobs: + yaml_style_check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: '>=1.17.0' + - run: go version + - name: check yaml changes + run: | + go install github.com/google/yamlfmt/cmd/yamlfmt@latest + yamlfmt ./**/**.yaml + yamlfmt ./**/**.yml + - name: Verify Changed files + uses: tj-actions/verify-changed-files@v16 + id: verify-changed-files + with: + files: | + **/*.yaml + **/*.yml + - name: Run step only when any of the above files change. + if: steps.verify-changed-files.outputs.files_changed == 'true' + run: |- + echo "Changed files: ${{ steps.verify-changed-files.outputs.changed_files }}" + false