Skip to content

Commit

Permalink
Update auto_format_python.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kalcohol authored Feb 6, 2025
1 parent 9fa6245 commit b6c9075
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/auto_format_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.head_ref }}

- name: Set up Python
uses: actions/setup-python@v2
Expand All @@ -44,10 +44,11 @@ jobs:
- name: Commit changes
if: steps.check_changes.outputs.has_diff == 'true'
run: |
git config --local user.name "github-actions"
git config --local user.email "github-actions@github.com"
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Format Python code with Black" || echo "No changes to commit"
git commit -m "Format Python code with Black"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git push origin HEAD:main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit b6c9075

Please sign in to comment.