diff --git a/.gflows/libs/steps.lib.yml b/.gflows/libs/steps.lib.yml index 3cedf63..9b5e7e2 100644 --- a/.gflows/libs/steps.lib.yml +++ b/.gflows/libs/steps.lib.yml @@ -114,6 +114,7 @@ with: #@ end #@ build_args.append("COMMIT_SHA=${{ github.sha }}") #@ if build_versioned_image: + #@ build_args.append("BUILD_DATETIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}") #@ build_args.append("APP_VERSION=${{ needs.version.outputs.app_version }}") #@ build_args.append("FILE_VERSION=${{ needs.version.outputs.file_version }}") #@ build_args.append("INFORMATIONAL_VERSION=${{ needs.version.outputs.information_version }}") diff --git a/github-sample/workflows/build-publish.yml b/github-sample/workflows/build-publish.yml index 3f98507..7cc35dd 100644 --- a/github-sample/workflows/build-publish.yml +++ b/github-sample/workflows/build-publish.yml @@ -111,6 +111,7 @@ jobs: type=registry,ref=ghcr.io/covergo/auth-nuget-cache:${{ needs.version.outputs.issue_id_slug }} build-args: |- COMMIT_SHA=${{ github.sha }} + BUILD_DATETIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} APP_VERSION=${{ needs.version.outputs.app_version }} FILE_VERSION=${{ needs.version.outputs.file_version }} INFORMATIONAL_VERSION=${{ needs.version.outputs.information_version }} @@ -182,6 +183,7 @@ jobs: cache-to: type=registry,ref=ghcr.io/covergo/auth-nuget-default-cache:${{ needs.version.outputs.issue_id_slug }},mode=max build-args: |- COMMIT_SHA=${{ github.sha }} + BUILD_DATETIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} APP_VERSION=${{ needs.version.outputs.app_version }} FILE_VERSION=${{ needs.version.outputs.file_version }} INFORMATIONAL_VERSION=${{ needs.version.outputs.information_version }} @@ -266,6 +268,7 @@ jobs: build-args: |- NOW="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" COMMIT_SHA=${{ github.sha }} + BUILD_DATETIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} APP_VERSION=${{ needs.version.outputs.app_version }} FILE_VERSION=${{ needs.version.outputs.file_version }} INFORMATIONAL_VERSION=${{ needs.version.outputs.information_version }} @@ -314,6 +317,7 @@ jobs: target: build-predeployment build-args: |- COMMIT_SHA=${{ github.sha }} + BUILD_DATETIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} APP_VERSION=${{ needs.version.outputs.app_version }} FILE_VERSION=${{ needs.version.outputs.file_version }} INFORMATIONAL_VERSION=${{ needs.version.outputs.information_version }}