From f8a8fc57f27ca3184ad7cbc59c92b5c03bb8f72e Mon Sep 17 00:00:00 2001 From: Mischa Taylor Date: Sat, 18 Nov 2023 14:18:29 -0500 Subject: [PATCH] Add docker-metadata-action --- .github/workflows/hadolint.yml | 4 ++++ hadolint/docker-bake.hcl | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/hadolint.yml b/.github/workflows/hadolint.yml index 783e607..7396255 100644 --- a/.github/workflows/hadolint.yml +++ b/.github/workflows/hadolint.yml @@ -19,6 +19,10 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + - name: Install QEMU static binaries uses: docker/setup-qemu-action@v3 diff --git a/hadolint/docker-bake.hcl b/hadolint/docker-bake.hcl index 3ad39a3..a69f364 100644 --- a/hadolint/docker-bake.hcl +++ b/hadolint/docker-bake.hcl @@ -15,6 +15,9 @@ variable "LOCAL_PLATFORM" { default = regex_replace("${BAKE_LOCAL_PLATFORM}", "^(darwin)", "linux") } +# Special target: https://github.com/docker/metadata-action#bake-definition +target "docker-metadata-action" { } + target "_common" { dockerfile = "Containerfile" tags = [ @@ -36,7 +39,7 @@ target "local" { } group "default" { - targets = ["lint", "release"] + targets = ["docker-metadata-action", "lint", "release"] } target "release" {