Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

autofix.yml

48 lines1.7 KB

1name: autofix.ci # needed to securely identify the workflow
2​
3on:
4 pull_request:
5 push:
6 branches: [main, 'v[0-9]', '*-pre', '*-maint']
7 workflow_dispatch:
8 inputs:
9 generate-docs:
10 description: 'Generate docs'
11 required: false
12 default: false
13 type: boolean
14​
15concurrency:
16 group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
17 cancel-in-progress: true
18​
19permissions:
20 contents: read
21​
22jobs:
23 autofix:
24 # Skip pushes of this workflow's own commit; matches the `commit-message` below. Only the
25 # subject is checked: a squash merge lists the branch's commits in the body, so `contains`
26 # would also skip any pull request autofix had touched. A manual `workflow_dispatch` carries
27 # no `head_commit`, so it always runs β€” the way to force a rerun.
28 if: "${{ !startsWith(github.event.head_commit.message, 'ci: apply automated fixes') }}"
29 name: autofix
30 runs-on: ubuntu-latest
31 steps:
32 - name: Checkout
33 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
34 with:
35 persist-credentials: false
36 - name: Setup Tools
37 uses: TanStack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3
38 # Only on pushes: regenerating on every pull request would add large, unrelated diffs.
39 - name: Generate reference docs
40 if: ${{ github.event_name == 'push' || github.event.inputs.generate-docs == true }}
41 run: pnpm run generate-docs
42 - name: Fix formatting
43 run: pnpm run format
44 - name: Apply fixes
45 uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27
46 with:
47 commit-message: 'ci: apply automated fixes'
48 fail-fast: ${{ github.event_name == 'pull_request' }}