Skip to content

Commit

Permalink
Add yamlfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ArendJan committed Oct 25, 2023
1 parent ac8a455 commit 9976716
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/yamlfmt.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9976716

Please sign in to comment.