Skip to content

Commit 2912629

Browse files
committed
ci(workflows): standardize GitHub Actions workflows
- Build: always run on push to main (remove paths filter) - Contributors: run at 1:00 AM EST, output HTML format - PR Title Lint: standardize to only lint PR titles
1 parent 8fa980f commit 2912629

3 files changed

Lines changed: 31 additions & 11 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ on:
1010
push:
1111
branches:
1212
- main
13-
paths:
14-
- 'src/**'
15-
- '.github/workflows/build.yml'
1613

1714
jobs:
1815
build:

.github/workflows/commit-lint.yml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,33 @@
1-
name: Commit Lint
1+
name: Lint PR Title
22

33
on:
44
pull_request:
5-
types: [opened, edited, synchronize, reopened]
5+
types: [opened, edited, reopened, synchronize]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: read
610

711
jobs:
8-
commitlint:
9-
uses: CodingWithCalvin/.github/.github/workflows/commit-lint.yml@main
12+
lint-pr-title:
13+
name: Lint PR Title
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20'
23+
24+
- name: Install commitlint
25+
run: |
26+
npm install --save-dev @commitlint/cli@18.4.3 @commitlint/config-conventional@18.4.3
27+
28+
- name: Validate PR title
29+
env:
30+
PR_TITLE: ${{ github.event.pull_request.title }}
31+
run: |
32+
echo "Validating PR title: $PR_TITLE"
33+
echo "$PR_TITLE" | npx commitlint --verbose

.github/workflows/contributors.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
name: Update Contributors
22

33
on:
4-
push:
5-
branches:
6-
- main
74
schedule:
8-
- cron: '0 0 * * *'
5+
- cron: '0 6 * * *'
96
workflow_dispatch:
107

118
jobs:
129
contributors:
1310
uses: CodingWithCalvin/.github/.github/workflows/contributors.yml@main
11+
with:
12+
output-format: html
1413
secrets: inherit

0 commit comments

Comments
 (0)