-
Notifications
You must be signed in to change notification settings - Fork 35
37 lines (28 loc) · 933 Bytes
/
lint.yml
File metadata and controls
37 lines (28 loc) · 933 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# SPDX-License-Identifier: MIT
# Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved.
name: Lint & Auto-Fix
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Ruff
run: pip install ruff
- name: Run Ruff and auto-fix issues
run: ruff check . --fix
- name: Run Ruff formatter
run: ruff format .
- name: Commit and push fixes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Apply Ruff auto-fixes" || echo "No changes to commit"
git push
continue-on-error: true