Skip to content

Commit

Permalink
add necessary changes to workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Oguz Ozturk <[email protected]>
  • Loading branch information
oguzkaganozt committed Mar 13, 2024
1 parent 7a0efd3 commit ab8b27f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/actions/docker-build-and-push/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ runs:
echo "$EOF" >> $GITHUB_OUTPUT
shell: bash

- name: Docker meta for base
id: meta-base
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
tags: ${{ steps.set-docker-tags.outputs.tags }}
bake-target: docker-metadata-action-base
flavor: |
latest=false
suffix=-base${{ inputs.tag-suffix }}
- name: Docker meta for prebuilt
id: meta-prebuilt
uses: docker/metadata-action@v4
Expand Down Expand Up @@ -99,9 +110,11 @@ runs:
push: ${{ inputs.allow-push == 'true' }}
files: |
docker/${{ inputs.bake-target }}/docker-bake.hcl
${{ steps.meta-base.outputs.bake-file }}
${{ steps.meta-prebuilt.outputs.bake-file }}
${{ steps.meta-devel.outputs.bake-file }}
targets: |
base
prebuilt
devel
provenance: false
Expand All @@ -115,6 +128,7 @@ runs:
push: true
files: |
docker/${{ inputs.bake-target }}/docker-bake.hcl
${{ steps.meta-base.outputs.bake-file }}
${{ steps.meta-devel.outputs.bake-file }}
${{ steps.meta-prebuilt.outputs.bake-file }}
${{ steps.meta-runtime.outputs.bake-file }}
Expand All @@ -129,6 +143,7 @@ runs:
push: false
files: |
docker/${{ inputs.bake-target }}/docker-bake.hcl
${{ steps.meta-base.outputs.bake-file }}
${{ steps.meta-devel.outputs.bake-file }}
${{ steps.meta-prebuilt.outputs.bake-file }}
${{ steps.meta-runtime.outputs.bake-file }}
Expand Down
9 changes: 8 additions & 1 deletion docker/autoware-openadk/docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
group "default" {
targets = ["prebuilt", "devel", "runtime"]
targets = ["base", "prebuilt", "devel", "runtime"]
}

// For docker/metadata-action
target "docker-metadata-action-base" {}
target "docker-metadata-action-prebuilt" {}
target "docker-metadata-action-devel" {}
target "docker-metadata-action-runtime" {}

target "base" {
inherits = ["docker-metadata-action-prebuilt"]
dockerfile = "docker/autoware-openadk/Dockerfile"
target = "prebuilt"
}

target "prebuilt" {
inherits = ["docker-metadata-action-prebuilt"]
dockerfile = "docker/autoware-openadk/Dockerfile"
Expand Down

0 comments on commit ab8b27f

Please sign in to comment.