Created
October 10, 2022 14:48
-
-
Save Goldziher/59303db409f5c1889f07cb38ca23065e to your computer and use it in GitHub Desktop.
makefile that injects git user from github config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GH_CONFIG := ~/.config/gh/hosts.yml | |
GITHUB_USER := $(shell cat $(GH_CONFIG) | yq '.[].user' | xargs) | |
GITHUB_TOKEN := $(shell cat $(GH_CONFIG) | yq '.[].oauth_token' | xargs) | |
.PHONY: all | |
build: | |
docker build --build-arg=GITHUB_USER=$(GITHUB_USER) --build-arg=GITHUB_TOKEN=$(GITHUB_TOKEN) . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment