-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (27 loc) · 883 Bytes
/
Makefile
File metadata and controls
32 lines (27 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
registery=ghcr.io
image_name=byteford/runner
src =
version =
image =
lang := go \
maven \
python \
cs \
js \
terraform \
ansible \
k8s \
ubuntu \
crossplane
.PHONY:
build
getVersions:
# will pull all versions of go - this might not be a good idea
wget -q https://registry.hub.docker.com/v1/repositories/golang/tags -O - | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | awk -F: '{print $$3}' | grep '[0-9][.][0-9][0-9][.][0-9]-alpine$$' | sed 's/-alpine//g' > ./go/versions.txt
build:
$(foreach language,$(lang),\
$(foreach version,$(shell cat ./$(language)/versions.txt),\
$(MAKE) docker-build src=$(language) version=$(version) image=runner-$(language);))
docker-build:
docker build ./$(src) --build-arg IMAGE_TAG=$(version) -t $(registery)/$(image_name)/$(image):$(version)
docker push $(registery)/$(image_name)/$(image):$(version)