Skip to content

Commit

Permalink
fix: added git pull to format job and merged commit and push steps
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinknights29 committed Aug 12, 2024
1 parent 279fa00 commit cbe0678
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,15 @@ jobs:
id: git-check
run: |
git diff --exit-code || echo "changes=true" >> $GITHUB_OUTPUT
- name: Commit changes
- name: Commit and push changes
if: steps.git-check.outputs.changes == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -A
git commit -m "style: applied automatic formatting changes"
- name: Push changes
if: steps.git-check.outputs.changes == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
git pull --rebase origin ${{ github.ref }}
git push origin HEAD:${{ github.ref }}
version:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
Expand Down

0 comments on commit cbe0678

Please sign in to comment.