mirror of
https://github.com/fosrl/gerbil.git
synced 2026-02-25 14:26:42 +00:00
add cicd
This commit is contained in:
14
Makefile
14
Makefile
@@ -1,6 +1,14 @@
|
||||
|
||||
all: build push
|
||||
|
||||
docker-build-release:
|
||||
@if [ -z "$(tag)" ]; then \
|
||||
echo "Error: tag is required. Usage: make build-all tag=<tag>"; \
|
||||
exit 1; \
|
||||
fi
|
||||
docker buildx build --platform linux/arm64,linux/amd64 -t fosrl/gerbil:latest -f Dockerfile --push .
|
||||
docker buildx build --platform linux/arm64,linux/amd64 -t fosrl/gerbil:$(tag) -f Dockerfile --push .
|
||||
|
||||
build:
|
||||
docker build -t fosrl/gerbil:latest .
|
||||
|
||||
@@ -13,5 +21,9 @@ test:
|
||||
local:
|
||||
CGO_ENABLED=0 GOOS=linux go build -o gerbil
|
||||
|
||||
go-build-release:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o bin/gerbil_linux_arm64
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/gerbil_linux_amd64
|
||||
|
||||
clean:
|
||||
rm gerbil
|
||||
rm gerbil
|
||||
|
||||
Reference in New Issue
Block a user