Skip to content

Commit 44f4c33

Browse files
committed
Tweaks
1 parent 0da1daf commit 44f4c33

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

hooks/build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ from plumbum import FG, local
33
from plumbum.cmd import date, docker
44

55
# Check environment variables are present
6-
BASE_TAG = local.env["BASE_TAG"]
76
DOCKER_TAG = local.env["DOCKER_TAG"]
7+
BASE_TAG = local.env.get("BASE_TAG", DOCKER_TAG)
88
REPO = local.env["DOCKER_REPO"]
99
COMMIT = local.env.get("GIT_SHA1")
1010
DATE = date("--rfc-3339", "ns")

hooks/push

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ REGISTRY = local.env.get("REGISTRY_HOST", "docker.io")
66
REPO = local.env["DOCKER_REPO"]
77
SUFFIX = local.env.get("DOCKER_REPO_SUFFIX", "")
88
VERSION = local.env["DOCKER_TAG"]
9-
10-
PLATFORMS = local.env.get("DOCKER_PLATFORM")
11-
PG_VERSION = local.env.get("PG_VERSION", VERSION.split("-")[0])
9+
BASE_TAG = local.env.get("BASE_TAG", VERSION)
1210
GIT_SHA1 = local.env.get("GIT_SHA1", "")
1311

1412
# Log all locally available images; will help to pin images
@@ -37,15 +35,15 @@ def tags_to_push():
3735
return tags
3836

3937

40-
if PLATFORMS:
38+
if local.env.get("DOCKER_PLATFORM"):
4139
BUILD_DATE = date("--rfc-3339", "ns")
4240
cmd = docker[
4341
"buildx",
4442
"build",
4543
"--platform",
46-
PLATFORMS,
44+
local.env["DOCKER_PLATFORM"],
4745
"--build-arg",
48-
"BASE_TAG={}-alpine".format(PG_VERSION),
46+
"BASE_TAG={}".format(BASE_TAG),
4947
"--build-arg",
5048
"VCS_REF={}".format(GIT_SHA1),
5149
"--build-arg",

0 commit comments

Comments
 (0)