Skip to content

[Draft] Auto build image #6

[Draft] Auto build image

[Draft] Auto build image #6

Workflow file for this run

#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This workflow will build docker images when commit merged or pushed to master.
# or tags pushed.
name: Publish Docker Image
on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
workflow_dispatch:
jobs:
push_official_image:
name: Push Snapshot Docker Image to Docker Hub
runs-on: ubuntu-latest
if: ${{ startsWith(github.repository, 'NetEase/') }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: maven
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- run: echo "${{ secrets.DOCKERHUB_USER }}"
- name: Login to Docker Hub
if: github.ref == 'refs/heads/master'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build all module with Maven
run: mvn clean install -pl '!trino' -Djacoco.flink.skip=true -B -ntp -DskipTests
- name: Build and Push Amoro Docker Image
uses: docker/build-push-action@v4
with:
context: .
file: docker/amoro/Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.ref == 'refs/heads/master' }}
tags: arctic163/amoro:master-snapshot
- run: docker images
- name: Build and Push Amoro QuickDemo Docker Image
uses: docker/build-push-action@v4
with:
context: .
file: docker/quickdemo/Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.ref == 'refs/heads/master' }}
tags: arctic163/quickdemo:master-snapshot
build-args: |
FLINK_VERSION=1.15.3
AMORO_TAG=master-snapshot
- run: docker images