From e620dd4805ae0648b9394fd717b74008ab62297a Mon Sep 17 00:00:00 2001 From: Lev Vereshchagin Date: Sat, 12 Mar 2022 11:09:56 +0300 Subject: [PATCH] Rename build arg `USERNAME` to `REGISTRY_USER` --- .github/workflows/docker-build-push.yml | 2 +- docker-bake.hcl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index c4d2e206..9612342f 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -55,7 +55,7 @@ jobs: with: push: true env: - USERNAME: localhost:5000/frappe + REGISTRY_USER: localhost:5000/frappe - name: Test run: python3 tests/main.py diff --git a/docker-bake.hcl b/docker-bake.hcl index f30b9f6e..28355ada 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,7 +1,7 @@ # Docker Buildx Bake build definition file # Reference: https://github.com/docker/buildx/blob/master/docs/reference/buildx_bake.md -variable "USERNAME" { +variable "REGISTRY_USER" { default = "frappe" } @@ -45,9 +45,9 @@ function "tag" { params = [repo, version] result = [ # If `version` param is develop (development build) then use tag `latest` - "${version}" == "develop" ? "${USERNAME}/${repo}:latest" : "${USERNAME}/${repo}:${version}", + "${version}" == "develop" ? "${REGISTRY_USER}/${repo}:latest" : "${REGISTRY_USER}/${repo}:${version}", # Make short tag for major version if possible. For example, from v13.16.0 make v13. - can(regex("(v[0-9]+)[.]", "${version}")) ? "${USERNAME}/${repo}:${regex("(v[0-9]+)[.]", "${version}")[0]}" : "", + can(regex("(v[0-9]+)[.]", "${version}")) ? "${REGISTRY_USER}/${repo}:${regex("(v[0-9]+)[.]", "${version}")[0]}" : "", ] }