Skip to content

Commit

Permalink
ci: use container image for commitlint on GitHub Actions (#562)
Browse files Browse the repository at this point in the history
  • Loading branch information
huxuan authored May 19, 2024
1 parent bdfa0ab commit 0614cf9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
commitlint:
container:
image: commitlint/commitlint:19.3.0@sha256:54438df1d11ac1a7ad0e7b794e24f3e78d5490ec5303c2066fd93e53cf70d0fe
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- run: env | sort
- name: Install commitlint with conventional config
run: npm install --save-dev @commitlint/config-conventional @commitlint/cli
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Validate the latest commit message with commitlint
if: github.event_name == 'push'
run: echo "${{ github.event.head_commit.message }}" | npx commitlint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
commitlint:
container:
image: commitlint/commitlint:19.3.0@sha256:54438df1d11ac1a7ad0e7b794e24f3e78d5490ec5303c2066fd93e53cf70d0fe
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- run: env | sort
- name: Install commitlint with conventional config
run: npm install --save-dev @commitlint/config-conventional @commitlint/cli
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Validate the latest commit message with commitlint
if: github.event_name == 'push'
run: echo "${{ github.event.head_commit.message }}" | npx commitlint
Expand Down

0 comments on commit 0614cf9

Please sign in to comment.