File tree Expand file tree Collapse file tree 2 files changed +14
-9
lines changed
Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 2626 - uses : actions/checkout@v2
2727
2828 - name : Run tests
29- run : |
30- if [ -f docker-compose.test.yml ]; then
31- docker-compose --file docker-compose.test.yml build
32- docker-compose --file docker-compose.test.yml run sut
33- else
34- docker build . --file Dockerfile
35- fi
29+ run : make
3630
3731 # Push image to GitHub Packages.
3832 # See also https://docs.docker.com/docker-hub/builds/
5044 steps :
5145 - uses : actions/checkout@v2
5246
47+ - name : Build app
48+ run : make build
49+
5350 - name : Build image
5451 run : docker build . --file Dockerfile --tag $IMAGE_NAME
5552
Original file line number Diff line number Diff line change 11VERSION: =$(shell cat VERSION)
22
3+ IMAGE_NAME ?= prometheus-example-app
4+
35LDFLAGS ="-X main.appVersion=$(VERSION ) "
46
5- all :
7+ .PHONY : all build image
8+
9+ all : build image
10+
11+ build :
612 CGO_ENABLED=0 go build -ldflags=$(LDFLAGS ) -o prometheus-example-app --installsuffix cgo main.go
7- docker build -t quay.io/brancz/prometheus-example-app:$(VERSION ) .
13+
14+ image : build
15+ docker build -t ghcr.io/rhobs/$(IMAGE_NAME ) :$(VERSION ) .
You can’t perform that action at this time.
0 commit comments