Skip to content

Clarify README "How lorepy works" section #52

Clarify README "How lorepy works" section

Clarify README "How lorepy works" section #52

Workflow file for this run

# GitHub Action that uses Ruff and Black to check the code
name: Run Checks
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: # https://github.com/stefanzweifel/git-auto-commit-action#checkout-the-correct-branch
ref: ${{ github.head_ref }}
- uses: chartboost/ruff-action@v1
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
architecture: 'x64'
- run: pip install black
- name: Check if black formatting is needed
id: black_check
run: |
if black --check ./; then
echo "needs_formatting=false" >> $GITHUB_OUTPUT
else
echo "needs_formatting=true" >> $GITHUB_OUTPUT
fi
continue-on-error: true
- name: Apply black formatting and commit if needed
if: steps.black_check.outputs.needs_formatting == 'true'
run: |
black ./
git config --global user.name autoblack_push
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
git commit -am "fixup! Format Python code with psf/black push"
git push