Skip to content

Commit c23b6df

Browse files
authored
Merge pull request #32 from CoverGo/feat/CVHL-4036-add-custom-build-arg-support-to-service
feat: Custom build args support for docker build
2 parents b0f6d52 + c120b8f commit c23b6df

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

.gflows/libs/steps.lib.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ with:
109109
target: #@ component.docker_target
110110
#@ end
111111
#@ build_args = []
112+
#@ if hasattr(component,"build_args"):
113+
#@ build_args += component.build_args
114+
#@ end
112115
#@ build_args.append("COMMIT_SHA=${{ github.sha }}")
113116
#@ if build_versioned_image:
114117
#@ build_args.append("APP_VERSION=${{ needs.version.outputs.app_version }}")

.gflows/workflow-configuration/build-publish/settings.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ services:
7070
image_name: covergo/auth
7171
generate_docker_meta: true
7272
output_docker_digest: true
73+
build_args:
74+
- NOW="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
7375
- name: Auth Predeployment
7476
slug: auth-predeployment
7577
dockerfile: Dockerfile

github-sample/workflows/build-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ jobs:
264264
cache-to: type=registry,ref=ghcr.io/covergo/auth-cache:${{ needs.version.outputs.issue_id_slug }},mode=max
265265
target: build-service
266266
build-args: |-
267+
NOW="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
267268
COMMIT_SHA=${{ github.sha }}
268269
APP_VERSION=${{ needs.version.outputs.app_version }}
269270
FILE_VERSION=${{ needs.version.outputs.file_version }}

0 commit comments

Comments
 (0)