Skip to content

Commit

Permalink
fix check for push
Browse files Browse the repository at this point in the history
  • Loading branch information
nefrathenrici committed Mar 20, 2024
1 parent 63d9306 commit 4e99e10
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/yaml_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 4e99e10

Please sign in to comment.