Renders the whole code using Black code style #5
This file contains 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: Renders the whole code using Black code style | |
on: | |
workflow_dispatch: | |
jobs: | |
black: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Black-ify | |
uses: psf/black@stable | |
with: | |
options: "--verbose" | |
- name: Commit changes | |
run: | | |
d=`date '+%Y/%m/%dT%H:%M:%SZ'` | |
git config --local user.email ${{ secrets.MAIL }} | |
git config --local user.name ${{ secrets.USERNAME }} | |
git add -A | |
git commit -m "Code style changed to Black at ${d}" | |
- name: Push commit | |
uses: ad-m/[email protected] | |
with: | |
force: true | |
directory: "." | |
branch: ${{ github.ref }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} |