-
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.31 KB
/
ci-push-main.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
name: CI - Push to main
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: write
jobs:
format:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
steps:
- name: Check out code using Git
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.STUDIOCMS_SERVICE_TOKEN }}
- name: Install Tools & Dependencies
uses: ./.github/actions/install
- name: Format code
run: pnpm run lint:fix
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5
with:
commit_message: '[ci] lint'
branch: ${{ github.head_ref }}
commit_user_name: studiocms-no-reply
commit_user_email: [email protected]
commit_author: StudioCMS <[email protected]>
mergebot:
if: ${{ github.repository_owner == 'withstudiocms' && github.event_name == 'push' && github.event.commits[0].message != '[ci] lint' }}
uses: withstudiocms/automations/.github/workflows/mergebot.yml@main
secrets:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_MERGEBOT }}