Skip to content

Fix timing ensure branch is pushed #12

Fix timing ensure branch is pushed

Fix timing ensure branch is pushed #12

Workflow file for this run

name: Ruff
on:
push:
branches:
- main
- master
- 'feature/*'
pull_request:
branches:
- main
- master
- 'feature/*'
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache Ruff
uses: actions/cache@v3
with:
path: ~/.cache/ruff
key: ${{ runner.os }}-ruff-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-ruff-
- name: Run Ruff
uses: chartboost/ruff-action@v1
with:
args: "check --fix ." # Run `ruff check` with `--fix` on the entire codebase
- name: Commit and push changes
run: |
if [[ `git status --porcelain` ]]; then
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "chore: auto-format code with Ruff"
git push
fi