Skip to content

Commit 7c671b2

Browse files
committed
ci: use container image for commitlint on GitHub Actions
1 parent bdfa0ab commit 7c671b2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/commitlint.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ concurrency:
44
group: ${{ github.workflow }}-${{ github.ref }}
55
jobs:
66
commitlint:
7+
container:
8+
image: commitlint/commitlint:19.3.0@sha256:54438df1d11ac1a7ad0e7b794e24f3e78d5490ec5303c2066fd93e53cf70d0fe
79
runs-on: ubuntu-22.04
810
steps:
9-
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
1011
- run: env | sort
11-
- name: Install commitlint with conventional config
12-
run: npm install --save-dev @commitlint/config-conventional @commitlint/cli
12+
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
1313
- name: Validate the latest commit message with commitlint
1414
if: github.event_name == 'push'
1515
run: echo "${{ github.event.head_commit.message }}" | npx commitlint

template/[% if repo_platform == 'github' %].github[% endif %]/workflows/commitlint.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ concurrency:
44
group: ${{ github.workflow }}-${{ github.ref }}
55
jobs:
66
commitlint:
7+
container:
8+
image: commitlint/commitlint:19.3.0@sha256:54438df1d11ac1a7ad0e7b794e24f3e78d5490ec5303c2066fd93e53cf70d0fe
79
runs-on: ubuntu-22.04
810
steps:
9-
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
1011
- run: env | sort
11-
- name: Install commitlint with conventional config
12-
run: npm install --save-dev @commitlint/config-conventional @commitlint/cli
12+
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
1313
- name: Validate the latest commit message with commitlint
1414
if: github.event_name == 'push'
1515
run: echo "${{ github.event.head_commit.message }}" | npx commitlint

0 commit comments

Comments
 (0)