Skip to content

fix(lint): add a new blank line in template-publish-image. #35

fix(lint): add a new blank line in template-publish-image.

fix(lint): add a new blank line in template-publish-image. #35

name: Build and Publish Images
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
jobs:
build-and-publish:
name: Build and Publish Images
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- component-name: databend-operator
dockerfile: ./Dockerfile
platforms: linux/amd64,linux/arm64
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Push Flag
id: set-push
run: |
echo "push=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}" >> $GITHUB_OUTPUT
- name: Publish Component ${{ matrix.component-name }}
if: >-
github.repository == 'databendcloud/databend-operator' &&
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))
id: publish
uses: ./.github/workflows/template-publish-image
with:
image: ${{ matrix.component-name }}
dockerfile: ${{ matrix.dockerfile }}
platforms: ${{ matrix.platforms }}
context: ${{ matrix.context || '.' }}
push: true
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Test Build for Component ${{ matrix.component-name }}
uses: ./.github/workflows/template-publish-image
with:
image: ${{ matrix.component-name }}
dockerfile: ${{ matrix.dockerfile }}
platforms: ${{ matrix.platforms }}
context: ${{ matrix.context || '.' }}
push: false
github_token: ${{ secrets.GITHUB_TOKEN }}