Skip to content

Commit

Permalink
Added check for changes before committing
Browse files Browse the repository at this point in the history
  • Loading branch information
415matt authored Jun 19, 2024
1 parent 948298f commit 6fe8ae2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,15 @@ jobs:
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run Python script
run: python src/main.py --config src/config/config.json
- name: Check for changes
id: check_changes
run: |
git diff --quiet || echo "::set-output name=changes::true"
- name: Commit and push changes
if: steps.check_changes.outputs.changes == 'true'
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "Updated sitemap (Automated)"
git commit -m "Automated changes"
git push

0 comments on commit 6fe8ae2

Please sign in to comment.