-
Notifications
You must be signed in to change notification settings - Fork 6
45 lines (37 loc) · 1.02 KB
/
format.yml
File metadata and controls
45 lines (37 loc) · 1.02 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
name: Fix formatting
on:
pull_request:
types: [labeled]
permissions: {}
jobs:
format:
runs-on: ubuntu-latest
if: ${{ github.event.label.name == 'ci:format' }}
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies with mise
uses: jdx/mise-action@v3
- name: Install dependencies
run: pnpm install
- name: Lint with expo
run: pnpm expo lint --fix
- name: Commit and push
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: 'chore: fix formatting'
- name: Remove label
uses: actions/github-script@v7
if: always()
with:
script: |
github.rest.issues.removeLabel({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: 'ci:format'
})