diff --git a/Makefile b/Makefile index 7fa63f8f05..a9bbd60bf6 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ include Makefile.build.mk -CURRENT_USER := $(shell id -u -n) +CURRENT_USER := $(if $(GITHUB_USER),$(GITHUB_USER),$(shell id -u -n)) MINIO_TAG ?= 0.20231101.183725-r1 RQLITE_TAG ?= 8.13.5-r0 DEX_TAG ?= 2.37.0-r12 diff --git a/cmd/imagedeps/testdata/schemahero/replacers/expected/test.mk b/cmd/imagedeps/testdata/schemahero/replacers/expected/test.mk index bee96aacc7..e322f01efc 100644 --- a/cmd/imagedeps/testdata/schemahero/replacers/expected/test.mk +++ b/cmd/imagedeps/testdata/schemahero/replacers/expected/test.mk @@ -1,4 +1,4 @@ -CURRENT_USER := $(shell id -u -n) +CURRENT_USER := $(if $(GITHUB_USER),$(GITHUB_USER),$(shell id -u -n)) SCHEMAHERO_TAG ?= 0.13.2 .PHONY: test diff --git a/cmd/imagedeps/testdata/schemahero/replacers/input/test.mk b/cmd/imagedeps/testdata/schemahero/replacers/input/test.mk index 1110517176..d918e5f594 100644 --- a/cmd/imagedeps/testdata/schemahero/replacers/input/test.mk +++ b/cmd/imagedeps/testdata/schemahero/replacers/input/test.mk @@ -1,4 +1,4 @@ -CURRENT_USER := $(shell id -u -n) +CURRENT_USER := $(if $(GITHUB_USER),$(GITHUB_USER),$(shell id -u -n)) SCHEMAHERO_TAG ?= 0.13.1 .PHONY: test diff --git a/deploy/kurl/kotsadm/hack/Makefile b/deploy/kurl/kotsadm/hack/Makefile index a2c9bb7766..148a4864f7 100644 --- a/deploy/kurl/kotsadm/hack/Makefile +++ b/deploy/kurl/kotsadm/hack/Makefile @@ -37,7 +37,7 @@ generate: DEX_TAG=$(shell source ../../../../.image.env && echo "$$DEX_TAG") \ ${MAKE} _generate -_generate: CURRENT_USER = $(shell id -u -n) +_generate: CURRENT_USER = $(if $(GITHUB_USER),$(GITHUB_USER),$(shell id -u -n)) _generate: generate-tag @cd ../template && ./generate.sh $(KOTS_VERSION) ttl.sh $(CURRENT_USER) 24h $(shell realpath ../../../../bin/kots) @rm -rf kurl/addons/kotsadm/$(KOTS_VERSION) diff --git a/hack/build-ttl.sh b/hack/build-ttl.sh index 7d2aafe493..c06fb70840 100755 --- a/hack/build-ttl.sh +++ b/hack/build-ttl.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -export CURRENT_USER=`id -u -n` +export CURRENT_USER=${GITHUB_USER:-$(id -u -n)} make build-ttl.sh diff --git a/kurl_proxy/Makefile b/kurl_proxy/Makefile index 1b5e7ee31a..e0203d8b49 100644 --- a/kurl_proxy/Makefile +++ b/kurl_proxy/Makefile @@ -1,5 +1,6 @@ include ./Makefile.build -CURRENT_USER := $(shell id -u -n) + +CURRENT_USER := $(if $(GITHUB_USER),$(GITHUB_USER),$(shell id -u -n)) .PHONY: test test: diff --git a/migrations/build-ttl.sh b/migrations/build-ttl.sh index 32a9769e95..8f9daea0f5 100755 --- a/migrations/build-ttl.sh +++ b/migrations/build-ttl.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -CURRENT_USER=`id -u -n` +CURRENT_USER=${GITHUB_USER:-$(id -u -n)} IMAGE=ttl.sh/${CURRENT_USER}/kotsadm-migrations:24h docker build -f deploy/Dockerfile -t ${IMAGE} .