Skip to content

Commit

Permalink
Use Github user as the current user when available
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalsaleh committed Dec 29, 2023
1 parent 8a11a40 commit d8b8f7a
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion cmd/imagedeps/testdata/schemahero/replacers/input/test.mk
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion deploy/kurl/kotsadm/hack/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion hack/build-ttl.sh
Original file line number Diff line number Diff line change
@@ -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

Expand Down
3 changes: 2 additions & 1 deletion kurl_proxy/Makefile
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion migrations/build-ttl.sh
Original file line number Diff line number Diff line change
@@ -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} .
Expand Down

0 comments on commit d8b8f7a

Please sign in to comment.