Skip to content

Commit

Permalink
ci(docker-build-and-push): add base tag to fix failure (autowarefound…
Browse files Browse the repository at this point in the history
…ation#4886)

Signed-off-by: M. Fatih Cırıt <[email protected]>
  • Loading branch information
xmfcx authored Jun 19, 2024
1 parent 036978a commit b757eb3
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/actions/docker-build-and-push/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,17 @@ runs:
echo "$EOF" >> $GITHUB_OUTPUT
shell: bash

- name: Docker meta for base
id: meta-base
uses: docker/metadata-action@v5
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
- name: Docker meta for prebuilt
id: meta-prebuilt
uses: docker/metadata-action@v5
Expand All @@ -77,7 +88,7 @@ runs:
suffix=-devel${{ inputs.tag-suffix }}
- name: Docker meta for runtime
if: ${{ github.event_name == 'workflow_dispatch' }} || ${{ (github.event_name == 'push' && github.ref_type == 'tag') }}
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref_type == 'tag') }}
id: meta-runtime
uses: docker/metadata-action@v5
with:
Expand All @@ -97,12 +108,15 @@ runs:
password: ${{ github.token }}

- name: Build and Push to GitHub Container Registry
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'registry') }}
if: ${{ github.event_name == 'push' ||
github.event_name == 'schedule' ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'registry') }}
uses: docker/bake-action@v4
with:
push: ${{ inputs.allow-push == 'true' }}
files: |
docker/docker-bake.hcl
${{ steps.meta-base.outputs.bake-file }}
${{ steps.meta-prebuilt.outputs.bake-file }}
${{ steps.meta-devel.outputs.bake-file }}
${{ steps.meta-runtime.outputs.bake-file }}
Expand All @@ -117,6 +131,7 @@ runs:
push: false
files: |
docker/docker-bake.hcl
${{ steps.meta-base.outputs.bake-file }}
${{ steps.meta-prebuilt.outputs.bake-file }}
${{ steps.meta-devel.outputs.bake-file }}
${{ steps.meta-runtime.outputs.bake-file }}
Expand Down

0 comments on commit b757eb3

Please sign in to comment.