Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
9ae6899cfa | ||
|
db66d4df79 | ||
|
b500d9c7b5 |
@@ -1,5 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 1.11.0 (2020/12/24)
|
||||||
|
|
||||||
|
* Inject `DOCKER_META_IMAGES` and `DOCKER_META_VERSION` args in bake definition (#37)
|
||||||
|
|
||||||
|
## 1.10.1 (2020/12/24)
|
||||||
|
|
||||||
|
* Missing entry in `action.yml`
|
||||||
|
|
||||||
## 1.10.0 (2020/12/24)
|
## 1.10.0 (2020/12/24)
|
||||||
|
|
||||||
* Add `bake-file` output (#36)
|
* Add `bake-file` output (#36)
|
||||||
|
34
README.md
34
README.md
@@ -159,8 +159,8 @@ jobs:
|
|||||||
### Bake definition
|
### Bake definition
|
||||||
|
|
||||||
This action also handles a bake definition file that can be used with the
|
This action also handles a bake definition file that can be used with the
|
||||||
[Docker Buildx Bake action](https://github.com/crazy-max/ghaction-docker-buildx-bake). You just have to declare a
|
[Docker Buildx Bake action](https://github.com/crazy-max/ghaction-docker-buildx-bake). You just have to declare an empty
|
||||||
target named `ghaction-docker-meta`.
|
target named `ghaction-docker-meta` and inherit from it.
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
// docker-bake.hcl
|
// docker-bake.hcl
|
||||||
@@ -220,6 +220,36 @@ jobs:
|
|||||||
build
|
build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Content of `${{ steps.docker_meta.outputs.bake-file }}` file will look like this:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"target": {
|
||||||
|
"ghaction-docker-meta": {
|
||||||
|
"tags": [
|
||||||
|
"name/app:1.1.1",
|
||||||
|
"name/app:1.1",
|
||||||
|
"name/app:latest"
|
||||||
|
],
|
||||||
|
"labels": {
|
||||||
|
"org.opencontainers.image.title": "Hello-World",
|
||||||
|
"org.opencontainers.image.description": "This your first repo!",
|
||||||
|
"org.opencontainers.image.url": "https://github.com/octocat/Hello-World",
|
||||||
|
"org.opencontainers.image.source": "https://github.com/octocat/Hello-World",
|
||||||
|
"org.opencontainers.image.version": "1.1.1",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Customizing
|
## Customizing
|
||||||
|
|
||||||
### inputs
|
### inputs
|
||||||
|
@@ -1512,6 +1512,10 @@ describe('bake-file', () => {
|
|||||||
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
|
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
|
||||||
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
|
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
|
||||||
"org.opencontainers.image.licenses": "MIT"
|
"org.opencontainers.image.licenses": "MIT"
|
||||||
|
},
|
||||||
|
"args": {
|
||||||
|
"DOCKER_META_IMAGES": "user/app",
|
||||||
|
"DOCKER_META_VERSION": "dev",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1539,6 +1543,10 @@ describe('bake-file', () => {
|
|||||||
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
|
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
|
||||||
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
|
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
|
||||||
"org.opencontainers.image.licenses": "MIT"
|
"org.opencontainers.image.licenses": "MIT"
|
||||||
|
},
|
||||||
|
"args": {
|
||||||
|
"DOCKER_META_IMAGES": "user/app",
|
||||||
|
"DOCKER_META_VERSION": "dev",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1569,6 +1577,10 @@ describe('bake-file', () => {
|
|||||||
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
|
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
|
||||||
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
|
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
|
||||||
"org.opencontainers.image.licenses": "MIT"
|
"org.opencontainers.image.licenses": "MIT"
|
||||||
|
},
|
||||||
|
"args": {
|
||||||
|
"DOCKER_META_IMAGES": "user/app",
|
||||||
|
"DOCKER_META_VERSION": "release1",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1600,6 +1612,10 @@ describe('bake-file', () => {
|
|||||||
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
|
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
|
||||||
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
|
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
|
||||||
"org.opencontainers.image.licenses": "MIT"
|
"org.opencontainers.image.licenses": "MIT"
|
||||||
|
},
|
||||||
|
"args": {
|
||||||
|
"DOCKER_META_IMAGES": "user/app",
|
||||||
|
"DOCKER_META_VERSION": "20200110",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1640,6 +1656,10 @@ describe('bake-file', () => {
|
|||||||
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
|
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
|
||||||
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
|
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
|
||||||
"org.opencontainers.image.licenses": "MIT"
|
"org.opencontainers.image.licenses": "MIT"
|
||||||
|
},
|
||||||
|
"args": {
|
||||||
|
"DOCKER_META_IMAGES": "org/app,ghcr.io/user/app",
|
||||||
|
"DOCKER_META_VERSION": "1.1.1",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1673,6 +1693,10 @@ describe('bake-file', () => {
|
|||||||
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
|
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
|
||||||
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
|
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
|
||||||
"org.opencontainers.image.licenses": "MIT"
|
"org.opencontainers.image.licenses": "MIT"
|
||||||
|
},
|
||||||
|
"args": {
|
||||||
|
"DOCKER_META_IMAGES": "org/app,ghcr.io/user/app",
|
||||||
|
"DOCKER_META_VERSION": "my",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1707,6 +1731,10 @@ describe('bake-file', () => {
|
|||||||
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
|
"org.opencontainers.image.created": "2020-01-10T00:30:00.000Z",
|
||||||
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
|
"org.opencontainers.image.revision": "90dd6032fac8bda1b6c4436a2e65de27961ed071",
|
||||||
"org.opencontainers.image.licenses": "MIT"
|
"org.opencontainers.image.licenses": "MIT"
|
||||||
|
},
|
||||||
|
"args": {
|
||||||
|
"DOCKER_META_IMAGES": "org/app",
|
||||||
|
"DOCKER_META_VERSION": "v1.1.1",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -50,6 +50,9 @@ inputs:
|
|||||||
tag-custom-only:
|
tag-custom-only:
|
||||||
description: 'Only use tag-custom as Docker tags'
|
description: 'Only use tag-custom as Docker tags'
|
||||||
required: false
|
required: false
|
||||||
|
label-custom:
|
||||||
|
description: 'List of custom labels'
|
||||||
|
required: false
|
||||||
sep-tags:
|
sep-tags:
|
||||||
description: 'Separator to use for tags output (default \n)'
|
description: 'Separator to use for tags output (default \n)'
|
||||||
required: false
|
required: false
|
||||||
|
6
dist/index.js
generated
vendored
6
dist/index.js
generated
vendored
@@ -434,7 +434,11 @@ class Meta {
|
|||||||
target: {
|
target: {
|
||||||
'ghaction-docker-meta': {
|
'ghaction-docker-meta': {
|
||||||
tags: this.tags(),
|
tags: this.tags(),
|
||||||
labels: jsonLabels
|
labels: jsonLabels,
|
||||||
|
args: {
|
||||||
|
DOCKER_META_IMAGES: this.inputs.images.join(','),
|
||||||
|
DOCKER_META_VERSION: this.version.main
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, null, 2));
|
}, null, 2));
|
||||||
|
@@ -164,7 +164,11 @@ export class Meta {
|
|||||||
target: {
|
target: {
|
||||||
'ghaction-docker-meta': {
|
'ghaction-docker-meta': {
|
||||||
tags: this.tags(),
|
tags: this.tags(),
|
||||||
labels: jsonLabels
|
labels: jsonLabels,
|
||||||
|
args: {
|
||||||
|
DOCKER_META_IMAGES: this.inputs.images.join(','),
|
||||||
|
DOCKER_META_VERSION: this.version.main
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user