Repository navigation
66 lines (57 loc) · 1.73 KB
/
Copy pathqc-autofix.yml
File metadata and controls
66 lines (57 loc) · 1.73 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
60
61
62
63
64
65
66
name: qc-autofix
on:
workflow_dispatch:
inputs:
issue:
description: "QC issue number or allowlist id"
required: true
dry_run:
description: "Run without creating a PR"
required: true
default: "true"
type: choice
options:
- "true"
- "false"
permissions:
contents: write
pull-requests: write
concurrency:
group: qc-autofix-${{ github.event.inputs.issue }}
cancel-in-progress: false
jobs:
autofix:
name: manual qc autofix
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
- name: Setup uv
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
with:
version: "0.11.21"
prune-cache: true
- name: Sync dependencies
run: uv sync --frozen --all-groups --python python3
- name: Plan autofix
env:
QC_AUTOFIX_ISSUE: ${{ github.event.inputs.issue }}
QC_AUTOFIX_DRY_RUN: ${{ github.event.inputs.dry_run }}
run: |
set -euo pipefail
uv run --frozen python tools/qc_patrol/cli.py autofix \
--issue "$QC_AUTOFIX_ISSUE" \
--dry-run "$QC_AUTOFIX_DRY_RUN" \
--create-pr true \
--out qc-out
- name: Upload QC artifacts
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: qc-autofix-${{ github.sha }}
path: qc-out/