Skip to content

Commit

Permalink
Create fix action
Browse files Browse the repository at this point in the history
  • Loading branch information
manabil authored Aug 20, 2023
1 parent 52ab40c commit ad4286f
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Fix

on: workflow_dispatch

jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v3

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff nbqa
- name: Fixing the code
run: nbqa ruff . --fix

- name: Commit files
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "Formatting notebook"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}

0 comments on commit ad4286f

Please sign in to comment.