Repository navigation
61 lines (54 loc) · 1.7 KB
/
Copy pathautofix.yml
File metadata and controls
61 lines (54 loc) · 1.7 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
name: autofix.ci # needed to securely identify the workflow
on:
merge_group:
pull_request:
branches:
- main
- next
paths: # Only run when changes are made to rust code or root Cargo
- "crates/**"
- "fuzz/**"
- "xtask/**"
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
- "rustfmt.toml"
permissions:
contents: read
jobs:
autofix:
runs-on: depot-ubuntu-24.04-arm-16
if: ${{ github.actor != 'autofix-ci[bot]' }}
steps:
- name: Checkout branch
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Install toolchain
uses: moonrepo/setup-rust@ede6de059f8046a5e236c94046823e2af11ca670 # v1.2.2
with:
components: rustfmt
cache-base: main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Run all the codegen
- name: Run the grammar codegen
run: cargo codegen grammar
- name: Run the analyzer codegen
run: cargo codegen analyzer
- name: Run the configuration codegen
run: cargo codegen-configuration
- name: Run the schema codegen
run: cargo codegen-schema
- name: Run the bindings codegen
run: cargo codegen-bindings
- name: Run the migrate codegen
run: cargo codegen-migrate
# Format Rust and TOML files
- name: Run format
run: |
cargo fmt --all
- uses: tombi-toml/setup-tombi@2119ac80a557c9fb2e7012858e63c22d8bf26cdb # v1.0.6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Format TOML files
run: tombi format
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27