Skip to content

Commit 484bdba

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 - Preview Changelog: add missing workflow
1 parent e6c5989 commit 484bdba

4 files changed

Lines changed: 30 additions & 18 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ on:
1111
push:
1212
branches:
1313
- main
14-
paths:
15-
- 'src/**'
16-
- '*.slnx'
17-
- '.github/workflows/build.yml'
1814

1915
jobs:
2016
build:

.github/workflows/commit-lint.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
1-
name: Commit Lint
1+
name: Lint PR Title
22

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

711
jobs:
8-
commitlint:
12+
lint-pr-title:
13+
name: Lint PR Title
914
runs-on: ubuntu-latest
1015
steps:
11-
- name: Checkout
16+
- name: Checkout code
1217
uses: actions/checkout@v4
13-
with:
14-
fetch-depth: 0
1518

1619
- name: Setup Node.js
1720
uses: actions/setup-node@v4
1821
with:
19-
node-version: 20
22+
node-version: '20'
2023

2124
- name: Install commitlint
2225
run: |
23-
npm install --save-dev @commitlint/cli @commitlint/config-conventional
26+
npm install --save-dev @commitlint/cli@18.4.3 @commitlint/config-conventional@18.4.3
2427
25-
- name: Lint PR title
28+
- name: Validate PR title
2629
env:
2730
PR_TITLE: ${{ github.event.pull_request.title }}
28-
run: echo "$PR_TITLE" | npx commitlint
29-
30-
- name: Lint commits
31-
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
31+
run: |
32+
echo "Validating PR title: $PR_TITLE"
33+
echo "$PR_TITLE" | npx commitlint --verbose

.github/workflows/contributors.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ name: Update Contributors
22

33
on:
44
schedule:
5-
- cron: '0 0 * * *'
5+
- cron: '0 6 * * *'
66
workflow_dispatch:
77

88
jobs:
99
contributors:
1010
uses: CodingWithCalvin/.github/.github/workflows/contributors.yml@main
11+
with:
12+
output-format: html
1113
secrets: inherit
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Preview Changelog
2+
3+
run-name: Preview release notes for next release
4+
5+
on:
6+
workflow_dispatch:
7+
8+
jobs:
9+
preview:
10+
name: Preview
11+
uses: CodingWithCalvin/.github/.github/workflows/generate-changelog.yml@main
12+
secrets: inherit

0 commit comments

Comments
 (0)