-
-
Notifications
You must be signed in to change notification settings - Fork 897
49 lines (39 loc) · 1.44 KB
/
autofix.yml
File metadata and controls
49 lines (39 loc) · 1.44 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
name: autofix.ci # For security reasons, the workflow in which the autofix.ci action is used must be named "autofix.ci".
permissions: {}
on:
pull_request:
types: [opened, synchronize]
branches-ignore:
- "**/graphite-base/**"
paths-ignore:
- "!.github/workflows/ci.yml"
- "!.github/actions/clone-submodules/action.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
jobs:
autofix:
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@83ed61bfbe2b8abbb3c66e8b65b1335484c70009 # v1.4.1
- uses: oxc-project/setup-node@8958a8e040102244b619c4a94fccb657a44b1c21 # v1.0.6
- uses: oxc-project/setup-rust@4f86b5d871ae7d24bc420e578be68964ab09e5cc # v1.0.15
with:
restore-cache: true
cache-key: warm
tools: just,cargo-shear@1.10.0
components: rustfmt
- name: cargo-shear
id: shear
shell: bash
run: |
if ! cargo shear --fix; then
echo "shear=true" >> $GITHUB_OUTPUT
fi
- name: Check and update lock file
run: cargo check --all-features --all-targets
if: ${{ steps.shear.outputs.shear == 'true' }}
- run: just fmt
- uses: autofix-ci/action@7a166d7532b277f34e16238930461bf77f9d7ed8 # v1.3.3
with:
fail-fast: false