-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (45 loc) · 1.33 KB
/
pull_request_check.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
name: pull_request_check
on:
pull_request:
branches:
- main
jobs:
check:
if: github.repository == 'mrlc/gkd-mrlc' && github.event.pull_request.user.login != 'renovate[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed_files
uses: tj-actions/changed-files@v44
with:
files: |
src/apps/*.ts
src/categories.ts
src/globalGroups.ts
src/subscription.ts
- name: Check changed files
run: |
for file in ${{ steps.changed_files.outputs.all_changed_files }}; do
echo "$file was changed"
done
if [ ${{ steps.changed_files.outputs.all_changed_files_count }} -gt 1 ]; then
echo "your src subscription changed files count must <= 1"
exit 1
fi
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: pnpm/action-setup@v4
- run: pnpm install
- run: pnpm run check
- run: pnpm run format
- run: pnpm run lint
- name: check format status
run: |
status=$(git status --porcelain)
if [ -n "$status" ]; then
echo "Something wasn't formatted properly"
git --no-pager diff
exit 1
fi