mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
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:
@@ -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)'
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user