Skip to content

Commit

Permalink
check diff before commit and push
Browse files Browse the repository at this point in the history
  • Loading branch information
agnesgaroux committed Aug 28, 2024
1 parent ac8df1a commit 5757136
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/autoformat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,15 @@ jobs:
AWS_SECRET_KEY: ${{ steps.aws_credentials.outputs.aws-secret-access-key }}
AWS_SESSION_TOKEN: ${{ steps.aws_credentials.outputs.aws-session-token }}

- name: Commit formatting changes
- name: Check for formatting changes
id: check_formatting_changes
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "changes=true" >> "$GITHUB_OUTPUT";
fi
- name: Commit and push formatting changes
if: steps.check_formatting_changes.outputs.changes == 'true'
run: |
git config user.name "Buildkite on behalf of Wellcome Collection"
git config user.email "[email protected]"
Expand Down

0 comments on commit 5757136

Please sign in to comment.