Skip to content

Commit 345f698

Browse files
authored
fix: STRF-11934 Separate Github PR Title check (#1199)
1 parent e40ba16 commit 345f698

File tree

4 files changed

+32
-17
lines changed

4 files changed

+32
-17
lines changed

.github/workflows/pull_request_review.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
41
name: Tests
52

63
on:
@@ -20,25 +17,17 @@ jobs:
2017

2118
steps:
2219
- name: Checkout code
23-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2421

2522
- name: Use Node.js ${{ matrix.node }}
26-
uses: actions/setup-node@v3
23+
uses: actions/setup-node@v4
2724
with:
2825
node-version: ${{ matrix.node }}
26+
cache: 'npm'
2927

3028
- name: Install Dependencies
3129
run: npm ci
3230

33-
- name: Verify Github PR Title TEST
34-
run: echo '${{ env.TITLE }}'
35-
36-
- name: Verify Github PR Title
37-
run: echo '${{ env.TITLE }}' | npx commitlint
38-
39-
- name: Verify Git Commit Name
40-
run: git log -1 --pretty=format:"%s" | npx commitlint
41-
4231
- name: Lint the code
4332
run: npm run lint
4433

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Pull Request Title Check
2+
3+
on:
4+
pull_request:
5+
branches: [master, main]
6+
7+
jobs:
8+
check-pr-title:
9+
env:
10+
TITLE: ${{ github.event.pull_request.title }}
11+
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: '18.x'
18+
cache: 'npm'
19+
- name: Install Dependencies
20+
run: npm ci
21+
22+
- name: Verify Github PR Title
23+
run: echo $TITLE | npx commitlint
24+
25+
- name: Verify Git Commit Name
26+
run: git log -1 --pretty=format:"%s" | npx commitlint

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
build:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
12-
- uses: actions/setup-node@v3
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
1313
with:
1414
node-version: '18.x'
1515
- run: npm i

.github/workflows/release_image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: Checkout repository
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919

2020
- name: Log in to the Container registry
2121
uses: docker/login-action@v2

0 commit comments

Comments
 (0)