-
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (40 loc) · 1.13 KB
/
Copy pathts.yml
File metadata and controls
47 lines (40 loc) · 1.13 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
46
47
name: TypeScript CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
with:
version: latest
run_install: true
- name: Run prepublishOnly
run: pnpm run prepublishOnly
- name: Check for file changes
id: git-check
run: |
if git diff --exit-code; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request with lint fixes
if: steps.git-check.outputs.changed == 'true' && github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@v8
with:
commit-message: "chore(lint): fix issues"
title: "chore(lint): fix issues"
body: "The `eslint fix` action wants to apply these fixes."
branch: "chore/eslint-fixes"
base: main
signoff: true
sign-commits: true