Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(docker-build-and-push): add base tag to fix failure #4886

Merged
merged 3 commits into from
Jun 19, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
youtalk marked this conversation as resolved.
Show resolved Hide resolved

- 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') }}
youtalk marked this conversation as resolved.
Show resolved Hide resolved
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') }}
youtalk marked this conversation as resolved.
Show resolved Hide resolved
xmfcx marked this conversation as resolved.
Show resolved Hide resolved
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
Loading