Skip to content

Commit ec4aa7f

Browse files
togashidmddib
authored andcommitted
add image build in the ci (intel#21)
1 parent 57cb7d2 commit ec4aa7f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
branches: [ '**' ]
77
jobs:
88
build:
9+
if: github.event_name == 'push'
910
runs-on: [self-hosted, linux, x64]
1011
steps:
1112
- uses: actions/checkout@v2
@@ -45,19 +46,22 @@ jobs:
4546
- name: Test race
4647
run: go test -race ./...
4748
shellcheck:
49+
if: github.event_name == 'push'
4850
name: Shellcheck
4951
runs-on: self-hosted
5052
steps:
5153
- uses: actions/checkout@v2
5254
- name: Run ShellCheck
5355
uses: ludeeus/action-shellcheck@master
5456
hadolint:
57+
if: github.event_name == 'push'
5558
runs-on: self-hosted
5659
name: Hadolint
5760
steps:
5861
- uses: actions/checkout@v2
5962
- run: wget -q https://github.com/hadolint/hadolint/releases/download/v2.10.0/hadolint-Linux-x86_64 -O hadolint; chmod +x hadolint ; find . -type f \( -name "Dockerfile*" \) -print0 | xargs -n 1 -0 ./hadolint ;
6063
gofmt-imports:
64+
if: github.event_name == 'push'
6165
runs-on: self-hosted
6266
name: Go Fmt and Go Import
6367
steps:
@@ -71,6 +75,7 @@ jobs:
7175
gofmt -l .
7276
shell: bash
7377
golangci:
78+
if: github.event_name == 'push'
7479
runs-on: self-hosted
7580
name: lint
7681
steps:
@@ -85,3 +90,13 @@ jobs:
8590
# skip-go-installation: true
8691
# Additional linting tools can be added here
8792
args: --enable=golint --timeout=5m
93+
image:
94+
runs-on: self-hosted
95+
name: build image
96+
if: github.event_name == 'pull_request'
97+
steps:
98+
- uses: actions/checkout@v2
99+
- name: docker
100+
run: docker build . -t planner
101+
- name: clean image
102+
run: docker rmi planner -f

0 commit comments

Comments
 (0)