Release Factorhouse Flink Docker Image #16
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: Release Factorhouse Flink Docker Image | |
on: | |
workflow_dispatch: | |
inputs: | |
image_tag: | |
description: | | |
The image tag for the Factorhouse Flink Docker image. | |
This tag should match the LTS release version of Flink, | |
as listed in the Flink documentation: | |
[https://nightlies.apache.org/flink/flink-docs-lts/](https://nightlies.apache.org/flink/flink-docs-lts/). | |
Expected format: X.Y.Z (e.g., 1.20.1). | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Log into DockerHub registry | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
# Add support for more platforms with QEMU (optional) | |
# https://github.com/docker/setup-qemu-action | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and Push Factorhouse Flink Docker Images | |
run: | | |
IMAGE_TAG="${{ github.event.inputs.image_tag }}" | |
.github/workflows/scripts/validate-image-tag.sh "$IMAGE_TAG" | |
FLINK_DOCKER_FILE_PATH=./resources/flex/docker | |
PLATFORMS="linux/amd64,linux/arm64" | |
for TAG in latest lts "$IMAGE_TAG"; do | |
echo "Building and pushing factorhouse/flink:$TAG" | |
docker buildx build \ | |
--platform=$PLATFORMS \ | |
-f "$FLINK_DOCKER_FILE_PATH/Dockerfile" \ | |
-t "factorhouse/flink:$TAG" \ | |
--push "$FLINK_DOCKER_FILE_PATH" | |
done |