Skip to content

Commit

Permalink
fix: attempt to fix commit logic, to trigger only when there are changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alfetopito committed Dec 19, 2024
1 parent 6278233 commit 5ee30c1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/updatePermitInfo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,20 @@ jobs:
id: git-check
run: |
git add src/public/PermitInfo.*.json
git status --porcelain | grep "src/public/PermitInfo.*\.json$" || echo "no_changes=true" >> $GITHUB_OUTPUT
if git status --porcelain | grep "src/public/PermitInfo.*\.json$"; then
echo "no_changes=false" >> $GITHUB_OUTPUT
else
echo "no_changes=true" >> $GITHUB_OUTPUT
fi
- name: Configure Git
if: ${{ !contains(steps.git-check.outputs, 'no_changes') }}
if: ${{ steps.git-check.outputs.no_changes == 'false' }}
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Commit and push changes
if: ${{ !contains(steps.git-check.outputs, 'no_changes') }}
if: ${{ steps.git-check.outputs.no_changes == 'false' }}
run: |
git commit -m "chore: automated permit info update"
git push origin main
Expand Down

0 comments on commit 5ee30c1

Please sign in to comment.