-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63d9306
commit 4e99e10
Showing
1 changed file
with
5 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,14 +22,12 @@ jobs: | |
go install github.com/google/yamlfmt/cmd/yamlfmt@latest | ||
- name: Format YAML files | ||
run: yamlfmt config | ||
- uses: dorny/[email protected] | ||
id: filter | ||
with: | ||
filters: | | ||
yaml_file_change: | ||
- modified: '**.yml' | ||
- name: Check for changes after formatting | ||
run: | | ||
git diff HEAD~ --exit-code # Check for changes after formatting | ||
id: check_changes | ||
- name: Add formatting changes, push | ||
if: steps.filter.outputs.yaml_file_change == 'true' | ||
if: steps.check_changes.outputs == 0 # Check exit code of previous step (0 means no changes) | ||
run: | | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --global user.name "GitHub Actions" | ||
|