Skip to content

Refactor as a python package #3

Refactor as a python package

Refactor as a python package #3

Workflow file for this run

name: auto-format
on:
workflow_dispatch:
pull_request:
paths:
- "src/**"
- "README.qmd"
env:
GH_TOKEN: ${{ github.token }}
jobs:
auto-format:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install dependencies
run: |
python -m pip install .[dev] --upgrade pip
- name: format
uses: psf/black@stable
with:
options: "--verbose"
use_pyproject: true
- name: commit & push
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "ci: 🤖 black formatting" && git push || echo "nothing to commit"
- uses: quarto-dev/quarto-actions/setup@v2
- name: quarto render readme
run: |
quarto render README.qmd
git add README.md
git commit -m "ci: 🤖 render readme" && git push || echo "nothing to commit"