Skip to content

Addeng profile from bash file #118

Addeng profile from bash file

Addeng profile from bash file #118

Workflow file for this run

name: Format with Black
on:
push:
branches:
- main
- final_project
workflow_dispatch: # this allows manual trigger from GitHub UI, even though it should not be necessary
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Black
run: pip install black
- name: Run Black
run: black .
- name: Commit changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git diff --cached --quiet || git commit -m "Apply Black code formatting"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}