CI (#3779): pass docker build arguments on Docker Hub (#4252)

This commit is contained in:
battlmonstr 2022-05-25 03:12:40 +02:00 committed by GitHub
parent b9bf97362b
commit 0d259384a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View File

@ -3,7 +3,7 @@ GOBIN = $(CURDIR)/build/bin
GIT_COMMIT ?= $(shell git rev-list -1 HEAD) GIT_COMMIT ?= $(shell git rev-list -1 HEAD)
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD) GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
GIT_TAG ?= $(shell git describe --tags --dirty) GIT_TAG ?= $(shell git describe --tags '--match=v*' --dirty)
CGO_CFLAGS := $(shell $(GO) env CGO_CFLAGS) # don't loose default CGO_CFLAGS := $(shell $(GO) env CGO_CFLAGS) # don't loose default
CGO_CFLAGS += -DMDBX_FORCE_ASSERTIONS=1 # Enable MDBX's asserts by default in 'devel' branch and disable in 'stable' CGO_CFLAGS += -DMDBX_FORCE_ASSERTIONS=1 # Enable MDBX's asserts by default in 'devel' branch and disable in 'stable'

8
hooks/build Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
# This is needed to pass build ARGs to Dockerfile.
# see https://docs.docker.com/docker-hub/builds/advanced/
DOCKER_FLAGS="-t $IMAGE_NAME" \
GIT_TAG=$(git describe --tags '--match=v*' --dirty) \
make docker

0
hooks/post_checkout Normal file → Executable file
View File