Skip to content
This repository has been archived by the owner on Jan 29, 2025. It is now read-only.

updating for github bot #10

updating for github bot

updating for github bot #10

Workflow file for this run

name: Black Code Formatter
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
format-code:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install Black
run: pip install black
- name: Run Black Formatter
id: action_black
run: |
black package/ tests/
git diff --exit-code || echo "Black found formatting issues!" # This will allow us to check if files have changed.
- name: Commit and push changes
if: steps.action_black.outcome == 'success' && git diff --exit-code

Check failure on line 34 in .github/workflows/black.yml

View workflow run for this annotation

GitHub Actions / Black Code Formatter

Invalid workflow file

The workflow is not valid. .github/workflows/black.yml (Line: 34, Col: 13): Unrecognized named-value: 'git'. Located at position 44 within expression: steps.action_black.outcome == 'success' && git diff --exit-code
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "style: format code with Black"
git push