Skip to content

Commit 613f017

Browse files
committed
chore(ci): fix workflow configuration issues
1 parent 08fd7fe commit 613f017

File tree

3 files changed

+24
-15
lines changed

3 files changed

+24
-15
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ jobs:
1212
- uses: actions/checkout@v4
1313

1414
# -------- pnpm + cache ----------
15-
- uses: pnpm/action-setup@v4 # installs pnpm (reads version from package.json if present)
15+
- uses: pnpm/action-setup@v4
16+
with:
17+
version: 8 # Specify pnpm version (adjust to your preferred version)
1618
- uses: actions/setup-node@v4
1719
with:
18-
node-version: 20 # single version is fine for lint
19-
cache: 'pnpm' # enables automatic pnpm-store caching
20+
node-version: 20
21+
cache: 'pnpm'
2022

2123
- run: pnpm install --frozen-lockfile
2224
- run: pnpm run lint
@@ -32,6 +34,8 @@ jobs:
3234

3335
# -------- pnpm + cache ----------
3436
- uses: pnpm/action-setup@v4
37+
with:
38+
version: 8 # Specify pnpm version
3539
- uses: actions/setup-node@v4
3640
with:
3741
node-version: ${{ matrix.node-version }}
@@ -48,6 +52,8 @@ jobs:
4852

4953
# -------- pnpm + cache ----------
5054
- uses: pnpm/action-setup@v4
55+
with:
56+
version: 8 # Specify pnpm version
5157
- uses: actions/setup-node@v4
5258
with:
5359
node-version: 20

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
persist-credentials: false
2424

2525
- uses: pnpm/action-setup@v4
26+
with:
27+
version: 8 # Specify pnpm version
2628
- uses: actions/setup-node@v4
2729
with:
2830
node-version: 20

.github/workflows/semantics.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,20 @@ jobs:
99
semantics:
1010
name: Semantics
1111
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: read
14+
contents: read
1215
steps:
13-
- uses: 8BitJonny/gh-get-current-pr@2.2.0
14-
id: pull-request
15-
with:
16-
sha: ${{ github.head_ref }}
17-
18-
- name: Add Commit Lint
19-
if: ${{ steps.pull-request.outputs.pr_found == 'true' }}
16+
- name: Validate PR Title
2017
run: |
18+
PR_TITLE="${{ github.event.pull_request.title }}"
19+
echo "Validating PR title: $PR_TITLE"
20+
21+
# Install commitlint
2122
npm init -y
2223
npm install --save-dev @commitlint/cli @commitlint/config-angular
24+
25+
# Configure commitlint
2326
echo "module.exports = { \
2427
extends: ['@commitlint/config-angular'], \
2528
rules: { \
@@ -30,8 +33,6 @@ jobs:
3033
'type-enum': [2, 'always', ['chore','feat','fix','refactor']] \
3134
} \
3235
};" > commitlint.config.js
33-
34-
- name: Validate Semantic Title
35-
if: ${{ steps.pull-request.outputs.pr_found == 'true' }}
36-
run: |
37-
echo "${{ steps.pull-request.outputs.pr_title }}" | npx commitlint
36+
37+
# Validate title
38+
echo "$PR_TITLE" | npx commitlint

0 commit comments

Comments
 (0)