Skip to content

Commit

Permalink
Merge pull request #32 from CoverGo/feat/CVHL-4036-add-custom-build-a…
Browse files Browse the repository at this point in the history
…rg-support-to-service

feat: Custom build args support for docker build
  • Loading branch information
NazmiAltun authored Dec 6, 2022
2 parents b0f6d52 + c120b8f commit c23b6df
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gflows/libs/steps.lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ with:
target: #@ component.docker_target
#@ end
#@ build_args = []
#@ if hasattr(component,"build_args"):
#@ build_args += component.build_args
#@ end
#@ build_args.append("COMMIT_SHA=${{ github.sha }}")
#@ if build_versioned_image:
#@ build_args.append("APP_VERSION=${{ needs.version.outputs.app_version }}")
Expand Down
2 changes: 2 additions & 0 deletions .gflows/workflow-configuration/build-publish/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ services:
image_name: covergo/auth
generate_docker_meta: true
output_docker_digest: true
build_args:
- NOW="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
- name: Auth Predeployment
slug: auth-predeployment
dockerfile: Dockerfile
Expand Down
1 change: 1 addition & 0 deletions github-sample/workflows/build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ jobs:
cache-to: type=registry,ref=ghcr.io/covergo/auth-cache:${{ needs.version.outputs.issue_id_slug }},mode=max
target: build-service
build-args: |-
NOW="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
COMMIT_SHA=${{ github.sha }}
APP_VERSION=${{ needs.version.outputs.app_version }}
FILE_VERSION=${{ needs.version.outputs.file_version }}
Expand Down

0 comments on commit c23b6df

Please sign in to comment.