Skip to content

Core: Update Manifest #76

Core: Update Manifest

Core: Update Manifest #76

Workflow file for this run

name: Code-Formatter
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Format code with Black
uses: psf/black@stable
with:
black_args: .
- name: Check for changes
id: check_changes
run: |
# Check if there are code changes
git diff --exit-code || echo "Code changes detected"
continue-on-error: true
- name: Commit formatted code
if: steps.check_changes.outputs.exit_code == '0'
run: |
# Configure Git user
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
# Add and commit changes if any
git add .
git diff --quiet && git diff --staged --quiet || git commit -m "Format code with Black"
- name: Push changes
if: steps.check_changes.outputs.exit_code == '0'
uses: ad-m/github-push-action@v0.7.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}