1- ---
21name : Prettier
32
43on :
54 push :
6- branches : [main]
5+ branches : [main, feat/ci-renovate-prettier ]
76 workflow_dispatch :
87
98concurrency :
@@ -15,31 +14,28 @@ jobs:
1514 name : Can the code be prettier? 🤔
1615 runs-on : ubuntu-latest
1716 # workflow_dispatch always lets you select the branch ref, even though in this case we only ever want to run the action on `main` this we need an if check
18- if : ${{ github.ref_name == 'main' }}
1917 steps :
20- - uses : actions/checkout@v4
21- - uses : actions/setup-node@v4
22- with :
23- cache : npm
24- node-version : lts/*
25- - run : npm ci --ignore-scripts --only-dev
26- - uses : actions/cache@v3
27- with :
28- path : node_modules/.cache/prettier/.prettier-cache
29- key : prettier-${{ hashFiles('package-lock.json') }}-${{ hashFiles('.gitignore') }}
30- - run : npx prettier --ignore-path .gitignore --cache --write .
31- - run : git restore .github/workflows
32- - uses : tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2
33- id : generate-token
34- with :
35- app_id : ${{ secrets.ECOSPARK_APP_ID }}
36- private_key : ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
37- - uses : peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v6
38- with :
39- author : github-actions <41898282+github-actions[bot]@users.noreply.github.com>
40- body : I ran `npx prettier --ignore-path .gitignore --cache --write .` 🧑💻
41- branch : actions/prettier-if-needed
42- commit-message : ' chore(prettier): 🤖 ✨'
43- labels : 🤖 bot
44- title : ' chore(prettier): 🤖 ✨'
45- token : ${{ steps.generate-token.outputs.token }}
18+ - uses : actions/checkout@v4
19+
20+ - uses : actions/setup-node@v4
21+ with :
22+ cache : npm
23+ node-version : lts/*
24+
25+ - run : npm install
26+ - run : npm run format
27+
28+ - uses : actions/create-github-app-token@v1
29+ id : generate-token
30+ with :
31+ app-id : ${{ secrets.ECOSPARK_APP_ID }}
32+ private-key : ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
33+ - uses : peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7
34+ with :
35+ body : I ran `pnpm format` 🧑💻
36+ branch : actions/prettier
37+ commit-message : " chore(prettier): 🤖 ✨"
38+ labels : 🤖 bot
39+ sign-commits : true
40+ title : " chore(prettier): 🤖 ✨"
41+ token : ${{ steps.generate-token.outputs.token }}
0 commit comments