Skip to content

Commit

Permalink
Push REPO_VERSION var into containers for builds
Browse files Browse the repository at this point in the history
Set `REPO_VERSION` via Podman and Docker container run commands
to properly have any externally set value (e.g., GitHub Actions)
inherited by the container build environment.

See also:

- atc0005/shared-project-resources#208
  • Loading branch information
atc0005 committed Jul 31, 2024
1 parent b980cc0 commit 7892f6f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,7 @@ docker-release-build: clean helper-builder-setup
@echo
@echo "Using x64 release builder image to generate project release assets"
$(CONTAINER_COMMAND) container run \
--env REPO_VERSION=$(REPO_VERSION) \
--platform linux/amd64 \
--user builduser:builduser \
--rm \
Expand All @@ -925,6 +926,7 @@ docker-release-build: clean helper-builder-setup

@echo "Using x86 release builder image to generate project release assets"
$(CONTAINER_COMMAND) container run \
--env REPO_VERSION=$(REPO_VERSION) \
--platform linux/i386 \
--user builduser:builduser \
--rm \
Expand All @@ -946,6 +948,7 @@ podman-release-build: clean helper-builder-setup
@echo
@echo "Using x64 release builder image to generate project release assets"
$(CONTAINER_COMMAND) container run \
--env REPO_VERSION=$(REPO_VERSION) \
--platform linux/amd64 \
--rm \
-i \
Expand All @@ -956,6 +959,7 @@ podman-release-build: clean helper-builder-setup

@echo "Using x86 release builder image to generate project release assets"
$(CONTAINER_COMMAND) container run \
--env REPO_VERSION=$(REPO_VERSION) \
--platform linux/i386 \
--rm \
-i \
Expand All @@ -976,6 +980,7 @@ docker-dev-build: clean helper-builder-setup
@echo
@echo "Using x64 release builder image to generate project release assets"
$(CONTAINER_COMMAND) container run \
--env REPO_VERSION=$(REPO_VERSION) \
--platform linux/amd64 \
--user builduser:builduser \
--rm \
Expand All @@ -997,6 +1002,7 @@ podman-dev-build: clean helper-builder-setup
@echo
@echo "Using release builder image to generate project release assets"
$(CONTAINER_COMMAND) container run \
--env REPO_VERSION=$(REPO_VERSION) \
--platform linux/amd64 \
--rm \
-i \
Expand All @@ -1019,6 +1025,7 @@ docker-packages: helper-builder-setup

@echo "Building with $(CONTAINER_COMMAND)"
$(CONTAINER_COMMAND) container run \
--env REPO_VERSION=$(REPO_VERSION) \
--platform linux/amd64 \
--user builduser:builduser \
--rm \
Expand All @@ -1042,6 +1049,7 @@ podman-packages: helper-builder-setup

@echo "Building with $(CONTAINER_COMMAND)"
$(CONTAINER_COMMAND) container run \
--env REPO_VERSION=$(REPO_VERSION) \
--platform linux/amd64 \
--rm \
-i \
Expand Down Expand Up @@ -1081,6 +1089,7 @@ podman-quick-build-linux:
@echo
@echo "Using x64 builder image to generate project release assets"
$(CONTAINER_COMMAND) container run \
--env REPO_VERSION=$(REPO_VERSION) \
--platform linux/amd64 \
--rm \
-i \
Expand Down Expand Up @@ -1122,6 +1131,7 @@ podman-quick-build-windows:
@echo
@echo "Using x64 builder image to generate project release assets"
$(CONTAINER_COMMAND) container run \
--env REPO_VERSION=$(REPO_VERSION) \
--platform linux/amd64 \
--rm \
-i \
Expand Down Expand Up @@ -1163,6 +1173,7 @@ podman-quick-build: clean podman-quick-build-linux podman-quick-build-windows
@echo
@echo "Using x64 builder image to generate project release assets"
$(CONTAINER_COMMAND) container run \
--env REPO_VERSION=$(REPO_VERSION) \
--platform linux/amd64 \
--rm \
-i \
Expand Down

0 comments on commit 7892f6f

Please sign in to comment.