Skip to content

Commit

Permalink
ci: Organize workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
seriaati committed Jun 4, 2024
1 parent 0969a10 commit 71fa545
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 68 deletions.
46 changes: 0 additions & 46 deletions .github/workflows/ruff-format.yml

This file was deleted.

23 changes: 1 addition & 22 deletions .github/workflows/ruff-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,5 @@ jobs:
python -m pip install --upgrade pip
pip install ruff
- name: Set git user
if: github.event_name == 'push'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Run linter with fix
if: github.event_name == 'push'
run: ruff check --fix --output-format=github .

- name: Run linter without fix
if: github.event_name == 'pull_request'
run: ruff check --output-format=github .

- name: Commit auto-fix changes
if: github.event_name == 'push'
run: |
git add .
git diff-index --quiet HEAD || git commit -m "fix: Apply ruff auto-fixes"
- name: Push changes
if: github.event_name == 'push'
run: git push origin main
run: ruff check --output-format=github .

0 comments on commit 71fa545

Please sign in to comment.