Skip to content

Commit

Permalink
Update .github/workflows/actions.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyuploader committed Sep 18, 2024
1 parent 310cebf commit 4ca2a75
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,26 @@ jobs:
- name: Prettify files
run: |
prettier --write .
- name: Check for changes
id: check_changes
run: |
git diff --exit-code || echo "Changes detected"
if [[ -z $(git status --porcelain) ]];
echo "changes=false" >> $GITHUB_ENV
else
echo "changes=true" >> $GITHUB_ENV
fi
- name: Commit files
if: steps.check_changes.outputs.changed == 'true'
if: env.changes == 'true'
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "Add changes"
- name: Push changes
if: steps.check_changes.outputs.changed == 'true'
if: env.changes == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 4ca2a75

Please sign in to comment.