Get Kafka env vars using Strimzi approach in data-generator #17
Workflow file for this run
This file contains hidden or 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: Docker Build and Push | |
| on: | |
| push: | |
| branches: [ "main", "release-**" ] | |
| tags: [ "[0-9]+.[0-9]+.[0-9]+" ] | |
| paths: | |
| - 'pom.xml' | |
| - '**.java' | |
| - 'Dockerfile' | |
| - '!docs/**' | |
| - '!deployment-examples/**' | |
| pull_request: | |
| types: [ opened, synchronize, reopened ] | |
| paths: | |
| - 'pom.xml' | |
| - '**.java' | |
| - 'Dockerfile' | |
| - '!docs/**' | |
| - '!deployment-examples/**' | |
| jobs: | |
| docker-build-and-push: | |
| 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: Generate Currency Converter Dockerfile | |
| working-directory: tutorials/currency-converter | |
| run: mvn -B docker:build -Ddocker.buildArchiveOnly # Skip building image, just create Dockerfile | |
| - name: Build Data Generator Image | |
| if: github.event_name != 'push' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: tutorials/data-generator/ | |
| platforms: linux/amd64,linux/arm64 | |
| push: false | |
| file: tutorials/data-generator/Dockerfile | |
| - name: Build Currency Converter Image | |
| if: github.event_name != 'push' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: tutorials/currency-converter/target/docker/flink-sql-runner-with-flink-udf-currency-converter/build/ | |
| platforms: linux/amd64,linux/arm64 | |
| push: false | |
| file: tutorials/currency-converter/target/docker/flink-sql-runner-with-flink-udf-currency-converter/build/Dockerfile | |
| - name: Data Generator Image metadata | |
| if: github.event_name == 'push' | |
| id: data_generator_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: Currency Converter Image metadata | |
| if: github.event_name == 'push' | |
| id: currency_converter_meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: | | |
| ${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/flink-sql-runner-with-flink-udf-currency-converter | |
| tags: | | |
| type=ref,event=branch | |
| type=ref,event=tag | |
| flavor: | | |
| latest=false | |
| prefix= | |
| suffix= | |
| - name: Build and Push Data Generator Image | |
| if: github.event_name == 'push' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: tutorials/data-generator/ | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| file: tutorials/data-generator/Dockerfile | |
| tags: ${{ steps.data_generator_meta.outputs.tags }} | |
| labels: ${{ steps.data_generator_meta.outputs.labels }} | |
| - name: Build and Push Currency Converter Image | |
| if: github.event_name == 'push' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: tutorials/currency-converter/target/docker/flink-sql-runner-with-flink-udf-currency-converter/build/ | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| file: tutorials/currency-converter/target/docker/flink-sql-runner-with-flink-udf-currency-converter/build/Dockerfile | |
| tags: ${{ steps.currency_converter_meta.outputs.tags }} | |
| labels: ${{ steps.currency_converter_meta.outputs.labels }} |