Skip to content

update

update #10

Workflow file for this run

name: format code with ruff
on:
push:
branches: [dev]
jobs:
code-format:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
- name: Install ruff
run: pip install ruff
- name: Run ruff to format code
run: |
ruff check . --exit-zero
ruff format .
git add -u
- name: Commit and push changes
run: |
git config --global user.name "5hojib"
git config --global user.email "yesiamshojib@gmail.com"
if git diff-index --quiet HEAD --; then
echo "No changes to commit."
else
git commit -m "Auto-format code [skip actions]"
git push origin ${{ github.ref }}
fi
env:
GITHUB_TOKEN: ${{ secrets.GX_TOKEN }}