Formatting code on branch refs/pull/69/merge #77
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Black Formatter | |
run-name: Formatting code on branch ${{ github.ref }} | |
on: pull_request | |
jobs: | |
format-with-black: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
id: checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Format code | |
id: format | |
run: | | |
pip install -U pip | |
pip install black | |
black . | |
- name: Commit formatted code | |
id: push | |
run: | | |
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" | |
git config user.name "${{ github.actor }}" | |
git add . | |
git commit -m "Code formatted with black" | |
git push | |
continue-on-error: true |