Merge pull request #44 from showuon/operatorMonitor #97
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [ "main", "release-**" ] | |
tags: [ "[0-9]+.[0-9]+.[0-9]+" ] | |
pull_request: | |
types: [ opened, synchronize, reopened ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: maven | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build with Maven | |
run: mvn -B clean verify | |
- name: Login to Quay | |
if: github.event_name == 'push' | |
uses: docker/login-action@v3 | |
with: | |
registry: "${{ secrets.IMAGE_REPO_HOSTNAME }}" | |
username: "${{ secrets.IMAGE_REPO_USERNAME }}" | |
password: "${{ secrets.IMAGE_REPO_PASSWORD }}" | |
- name: Build Image | |
if: github.event_name != 'push' | |
uses: docker/build-push-action@v6 | |
with: | |
context: data-generator/ | |
platforms: linux/amd64,linux/arm64 | |
push: false | |
file: data-generator/Dockerfile | |
- name: Image metadata | |
if: github.event_name == 'push' | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/flink-examples-data-generator | |
tags: | | |
type=ref,event=branch | |
type=ref,event=tag | |
flavor: | | |
latest=false | |
prefix= | |
suffix= | |
- name: Build and Push Image | |
if: github.event_name == 'push' | |
uses: docker/build-push-action@v6 | |
with: | |
context: data-generator/ | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
file: data-generator/Dockerfile | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |