ci: move commit length check from travis to gha

Using https://github.com/tim-actions/commit-message-checker-with-regex

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2021-01-05 17:09:56 -08:00
parent 1125ae7835
commit 8ccd39a91b
2 changed files with 17 additions and 2 deletions
+17
View File
@@ -81,3 +81,20 @@ jobs:
restore-keys: ${{ runner.os }}-go.sum-
- name: verify deps
run: make verify-dependencies
commit:
runs-on: ubuntu-20.04
steps:
- name: get pr commits
id: 'get-pr-commits'
uses: tim-actions/get-pr-commits@v1.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: check subject line length
uses: tim-actions/commit-message-checker-with-regex@v0.3.1
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
pattern: '^.{0,72}(\n.*)*$'
error: 'Subject too long (max 72)'
-2
View File
@@ -60,11 +60,9 @@ before_install:
- sudo apt-get -qq update
- sudo apt-get install -y libseccomp-dev
- GO111MODULE=off go get -u golang.org/x/lint/golint
- GO111MODULE=off go get -u github.com/vbatts/git-validation
- (cd ~ && GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt@v3.2.0)
- env | grep TRAVIS_
script:
- git-validation -run DCO,short-subject -v
- make
- make clean ci cross