removed duplicated workflow #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ruff | |
on: [push, pull_request] | |
jobs: | |
ruff: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: chartboost/ruff-action@v1 | |
with: | |
src: "./src" | |
args: "check --fix --show-fixes --output-format=github" | |
- name: Check for modified files | |
id: git-check | |
run: echo name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi) >> $GITHUB_OUTPUT | |
- name: Push changes | |
if: steps.git-check.outputs.modified == 'true' | |
run: | | |
git config --global user.name 'github-actions' | |
git config --global user.email 'github-actions@github.com' | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
git commit -am "Automated ruff fixes" | |
git push |