-
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (61 loc) · 2.32 KB
/
autofix.yml
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
67
68
69
70
71
72
73
74
75
# Note: this pipelines is for the `storm-stack` repository, it should be used to build and release the Storm Nx-Plugin packages.
name: "autofix.ci"
on:
workflow_dispatch:
inputs:
tag:
description: override release tag
required: false
push:
branches:
- main
- canary
- experimental
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
env:
CI: true
STORM_REPOSITORY: ${{ github.repositoryUrl }}
STORM_WORKSPACE_ROOT: ${{ github.workspace }}
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ github.token }}
NPM_TOKEN: ${{ secrets.STORM_BOT_NPM_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.STORM_BOT_CARGO_TOKEN }}
permissions:
contents: write
id-token: write
jobs:
autofix:
name: "Autofix"
runs-on: ubuntu-latest
if: github.repository == 'storm-software/storm-stack' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/canary' || github.ref == 'refs/heads/experimental')
steps:
- name: Setup workspace
uses: storm-software/action-setup@main
with:
package-manager: pnpm
package-manager-version: 9.10.0
storm-bot-github-token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }}
- uses: nrwl/nx-set-shas@v4
with:
main-branch-name: main
- name: Run formatters scripts
run: pnpm nx run-many -t format,build --parallel=5
shell: bash
- name: Run TOML linter
run: pnpm exec taplo format --config="./node_modules/@storm-software/linting-tools/taplo/config.toml"
- name: Run Prettier linter
run: pnpm exec prettier --write --ignore-unknown --no-error-on-unmatched-pattern --config="./node_modules/@storm-software/prettier/config.json" --ignore-path="./node_modules/@storm-software/prettier/.prettierignore"
# - name: Run Knip linter
# run: pnpm lint-knip
- name: Run README formatter
run: pnpm exec storm-git readme-gen --templates="./tools/readme-templates"
- name: Run Nx formatter
run: pnpm nx format:write
- name: Run Sherif linter
run: pnpm lint-sherif
- name: Apply fixes
uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a
with:
commit-message: "ci(monorepo): Apply automated CI fixes"