-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (49 loc) · 1.48 KB
/
linting.yml
File metadata and controls
59 lines (49 loc) · 1.48 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Linting
on:
workflow_call:
inputs:
ref:
required: true
type: string
commit_changes:
required: false
type: boolean
default: false
defaults:
run:
working-directory: ./
permissions:
contents: read
jobs:
lint-format:
permissions:
contents: write
runs-on: ubuntu-latest
name: Reformat Code
steps:
- name: Harden runner
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ inputs.ref }}
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
python-version: "3.10"
- name: Install dependencies
run: uv sync --group dev --frozen
- name: Run Formatter
run: uv run ruff format .
- name: Commit Changes
if: ${{ inputs.commit_changes == true }}
uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0
with:
commit_message: 'style: Apply automated code formatting [skip ci]'
commit_options: '--no-verify'
repository: .
commit_user_name: github-actions[bot]
commit_user_email: github-actions[bot]@users.noreply.github.com
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>