Skip to content

Commit 0c5660a

Browse files
ci: 👷 run pre-commit based checks only on actual commits, no tag based events
1 parent 3329c22 commit 0c5660a

1 file changed

Lines changed: 37 additions & 33 deletions

File tree

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,42 @@
11
name: Checks
22

33
on:
4-
push:
4+
push:
5+
branches:
6+
- "**"
7+
tags-ignore:
8+
- "**"
59

610
jobs:
7-
pre-commit:
8-
permissions:
9-
contents: write
10-
runs-on: ubuntu-latest
11-
12-
steps:
13-
- name: Checkout code
14-
uses: actions/checkout@v4
15-
16-
- name: Setup Bun
17-
uses: oven-sh/setup-bun@v2
18-
with:
19-
bun-version: latest
20-
21-
- name: Prep repository
22-
run: ./scripts/init.sh
23-
24-
- name: Run pre-commit checks
25-
run: ./.hooks/pre-commit
26-
27-
- name: Commit changes
28-
run: |
29-
git config --global user.name "GitHub Actions"
30-
git config --global user.email "actions@github.com"
31-
git add -A
32-
git commit -m "chore: apply pre-commit fixes" || echo "No changes to commit"
33-
34-
- name: Show git status
35-
run: git status
36-
37-
- name: Push changes
38-
run: git push
11+
pre-commit:
12+
permissions:
13+
contents: write
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Bun
21+
uses: oven-sh/setup-bun@v2
22+
with:
23+
bun-version: latest
24+
25+
- name: Prep repository
26+
run: ./scripts/init.sh
27+
28+
- name: Run pre-commit checks
29+
run: ./.hooks/pre-commit
30+
31+
- name: Commit changes
32+
run: |
33+
git config --global user.name "GitHub Actions"
34+
git config --global user.email "actions@github.com"
35+
git add -A
36+
git commit -m "chore: apply pre-commit fixes" || echo "No changes to commit"
37+
38+
- name: Show git status
39+
run: git status
40+
41+
- name: Push changes
42+
run: git push

0 commit comments

Comments
 (0)