From 1cabd6cd9dc364422e5d4dd1822c210fc448b0ba Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Thu, 24 Dec 2020 16:36:05 +0100 Subject: [PATCH] Inject DOCKER_META_IMAGES and DOCKER_META_VERSION args in bake definition --- README.md | 4 ++++ dist/index.js | 6 +++++- src/meta.ts | 6 +++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ce259b9..2b7cca2 100644 --- a/README.md +++ b/README.md @@ -240,6 +240,10 @@ Content of `${{ steps.docker_meta.outputs.bake-file }}` file will look like this "org.opencontainers.image.created": "2020-01-10T00:30:00.000Z", "org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071", "org.opencontainers.image.licenses": "MIT" + }, + "args": { + "DOCKER_META_IMAGES": "name/app", + "DOCKER_META_VERSION": "1.1.1" } } } diff --git a/dist/index.js b/dist/index.js index 02424e5..678aae9 100644 --- a/dist/index.js +++ b/dist/index.js @@ -434,7 +434,11 @@ class Meta { target: { 'ghaction-docker-meta': { tags: this.tags(), - labels: jsonLabels + labels: jsonLabels, + args: { + DOCKER_META_IMAGES: this.inputs.images.join(','), + DOCKER_META_VERSION: this.version.main + } } } }, null, 2)); diff --git a/src/meta.ts b/src/meta.ts index c019c03..592071d 100644 --- a/src/meta.ts +++ b/src/meta.ts @@ -164,7 +164,11 @@ export class Meta { target: { 'ghaction-docker-meta': { tags: this.tags(), - labels: jsonLabels + labels: jsonLabels, + args: { + DOCKER_META_IMAGES: this.inputs.images.join(','), + DOCKER_META_VERSION: this.version.main + } } } },