Skip to content

Commit dc98991

Browse files
committed
BUILD/MINOR: check-commit: trigger only on pull requests
1 parent 8d28e51 commit dc98991

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

.github/workflows/check.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
name: Commit subject
2-
on: [push, pull_request]
2+
on: [pull_request]
33
jobs:
44
check:
55
runs-on: ubuntu-latest
66
steps:
7-
- name: Check out code
8-
uses: actions/checkout@v2
9-
with:
10-
fetch-depth: 0
117
- name: check-commit
128
uses: docker://haproxytech/check-commit:latest
9+
env:
10+
API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitlab-ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ golangci-lint:
1919
script:
2020
- golangci-lint cache clean && go clean -modcache -cache -i
2121
- golangci-lint run -v --color always --timeout 120s
22+
only:
23+
- merge_requests
24+
- branches
2225
lint-commit-msg:
2326
stage: lint
2427
image:
@@ -28,6 +31,8 @@ lint-commit-msg:
2831
- go
2932
script:
3033
- /check
34+
only:
35+
- merge_requests
3136

3237
build:
3338
stage: build
@@ -43,6 +48,9 @@ build:
4348
- go env
4449
- go mod verify
4550
- make build
51+
only:
52+
- merge_requests
53+
- branches
4654

4755
.e2e:
4856
stage: e2e
@@ -61,6 +69,9 @@ build:
6169
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY_GO
6270
script:
6371
- bash -x ./e2e/run.bash
72+
only:
73+
- merge_requests
74+
- branches
6475

6576
HAProxy_2_1:
6677
extends: .e2e

0 commit comments

Comments
 (0)