Skip to content

Commit

Permalink
Create python-format.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
inoue0426 authored Mar 27, 2024
1 parent 6d296ae commit b21aa35
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/python-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Python Formatting

on: [push]

jobs:
format-code:
runs-on: ubuntu-latest

permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install black
run: python -m pip install black
- name: Format code
run: black .
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply auto-formatting
branch: ${{ github.head_ref }}

0 comments on commit b21aa35

Please sign in to comment.