mirror of
https://github.com/docker/metadata-action.git
synced 2025-04-10 03:20:24 +02:00
Update workflow
This commit is contained in:
parent
fc26125e64
commit
13836f0377
35
.github/workflows/ci.yml
vendored
35
.github/workflows/ci.yml
vendored
@ -177,3 +177,38 @@ jobs:
|
||||
name: Dump context
|
||||
if: always()
|
||||
uses: crazy-max/ghaction-dump-context@v1
|
||||
|
||||
bake:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
name: Docker meta
|
||||
id: docker_meta
|
||||
uses: ./
|
||||
with:
|
||||
images: |
|
||||
${{ env.DOCKER_IMAGE }}
|
||||
ghcr.io/name/app
|
||||
tag-sha: true
|
||||
tag-semver: |
|
||||
{{version}}
|
||||
{{major}}.{{minor}}
|
||||
{{major}}
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Build
|
||||
uses: crazy-max/ghaction-docker-buildx-bake@v1
|
||||
with:
|
||||
files: |
|
||||
./test/docker-bake.hcl
|
||||
${{ steps.docker_meta.outputs.bake-file }}
|
||||
targets: |
|
||||
release
|
||||
|
10
README.md
10
README.md
@ -171,15 +171,11 @@ target named `ghaction-docker-meta`.
|
||||
|
||||
```hcl
|
||||
// docker-bake.hcl
|
||||
target "ghaction-docker-meta" {
|
||||
tags = ["crazymax/diun:local"]
|
||||
labels = {
|
||||
"maintainer" = "CrazyMax"
|
||||
}
|
||||
}
|
||||
|
||||
target "ghaction-docker-meta" {}
|
||||
|
||||
target "build" {
|
||||
inherits = ["docker-meta"]
|
||||
inherits = ["ghaction-docker-meta"]
|
||||
context = "./"
|
||||
dockerfile = "Dockerfile"
|
||||
platforms = ["linux/amd64", "linux/arm/v6", "linux/arm/v7", "linux/arm64", "linux/386", "linux/ppc64le"]
|
||||
|
39
test/docker-bake.hcl
Normal file
39
test/docker-bake.hcl
Normal file
@ -0,0 +1,39 @@
|
||||
group "default" {
|
||||
targets = ["db", "app"]
|
||||
}
|
||||
|
||||
group "release" {
|
||||
targets = ["db", "app-plus"]
|
||||
}
|
||||
|
||||
target "db" {
|
||||
context = "./test"
|
||||
tags = ["docker.io/tonistiigi/db"]
|
||||
}
|
||||
|
||||
target "app" {
|
||||
context = "./test"
|
||||
dockerfile = "Dockerfile"
|
||||
args = {
|
||||
name = "foo"
|
||||
}
|
||||
tags = [
|
||||
"localhost:5000/name/app:latest",
|
||||
"localhost:5000/name/app:1.0.0"
|
||||
]
|
||||
}
|
||||
|
||||
target "cross" {
|
||||
platforms = [
|
||||
"linux/amd64",
|
||||
"linux/arm64",
|
||||
"linux/386"
|
||||
]
|
||||
}
|
||||
|
||||
target "app-plus" {
|
||||
inherits = ["app", "cross"]
|
||||
args = {
|
||||
IAMPLUS = "true"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user