Rename build arg USERNAME to REGISTRY_USER

This commit is contained in:
Lev Vereshchagin
2022-03-12 11:09:56 +03:00
parent 5076472d07
commit e620dd4805
2 changed files with 4 additions and 4 deletions

View File

@@ -55,7 +55,7 @@ jobs:
with: with:
push: true push: true
env: env:
USERNAME: localhost:5000/frappe REGISTRY_USER: localhost:5000/frappe
- name: Test - name: Test
run: python3 tests/main.py run: python3 tests/main.py

View File

@@ -1,7 +1,7 @@
# Docker Buildx Bake build definition file # Docker Buildx Bake build definition file
# Reference: https://github.com/docker/buildx/blob/master/docs/reference/buildx_bake.md # Reference: https://github.com/docker/buildx/blob/master/docs/reference/buildx_bake.md
variable "USERNAME" { variable "REGISTRY_USER" {
default = "frappe" default = "frappe"
} }
@@ -45,9 +45,9 @@ function "tag" {
params = [repo, version] params = [repo, version]
result = [ result = [
# If `version` param is develop (development build) then use tag `latest` # 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. # 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]}" : "",
] ]
} }