Skip to content

Add yamlfmt

Add yamlfmt #2

Workflow file for this run

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