Skip to content

Commit 5c99573

Browse files
committed
BUILD: ci: use latest code for testing validity of message
1 parent 40750bc commit 5c99573

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

.github/workflows/actions.yaml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,6 @@ jobs:
88
- uses: actions/checkout@v2
99
- name: golangci-lint
1010
uses: golangci/golangci-lint-action@v2
11-
check_commit:
12-
if: ${{ github.event_name == 'pull_request' }}
13-
name: HAProxy check commit message
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v2
17-
with:
18-
fetch-depth: 0
19-
- name: check-commit
20-
uses: docker://haproxytech/check-commit:latest
21-
env:
22-
API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2311
go_build:
2412
name: Go build
2513
runs-on: ubuntu-latest
@@ -41,7 +29,7 @@ jobs:
4129
go_test:
4230
name: Go test
4331
runs-on: ubuntu-latest
44-
needs: ["go_lint"]
32+
needs: ["go_build"]
4533
steps:
4634
- uses: actions/checkout@v2
4735
- uses: actions/setup-go@v2
@@ -54,3 +42,20 @@ jobs:
5442
- name: Build
5543
run: |
5644
go test ./...
45+
check_commit:
46+
if: ${{ github.event_name == 'pull_request' }}
47+
name: HAProxy check commit message
48+
runs-on: ubuntu-latest
49+
needs: ["go_build"]
50+
steps:
51+
- uses: actions/checkout@v2
52+
with:
53+
fetch-depth: 0
54+
- name: Set up Go 1.17
55+
uses: actions/setup-go@v2
56+
with:
57+
go-version: 1.17
58+
- name: check-commit
59+
run: go build -o check && ./check
60+
env:
61+
API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM golang:alpine as builder
22
RUN mkdir /build
33
ADD . /build/
44
WORKDIR /build
5-
RUN go build -o check check.go
5+
RUN go build -o check
66

77
FROM alpine:latest
88
COPY --from=builder /build/check /check

0 commit comments

Comments
 (0)