[Base] Added bc CLI utility #40
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: Push Docker images on Docker Hub | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build_base_images: | |
strategy: | |
matrix: | |
jdk_version: [8, 11, 17] | |
environment: docker-hub | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Run privileged | |
run: sudo docker run --privileged --rm tonistiigi/binfmt --install arm64 | |
- name: Build base corretto image | |
id: docker_build_corretto_base | |
uses: docker/build-push-action@v4 | |
with: | |
builder: ${{ steps.buildx.outputs.name }} | |
context: ./corretto-emr-dbs-universal-base | |
file: ./corretto-emr-dbs-universal-base/Dockerfile | |
build-args: | | |
JDK_VERSION=${{ matrix.jdk_version }} | |
push: true | |
tags: | | |
infrahelpers/dpp:jdk${{ matrix.jdk_version }} | |
infrahelpers/dpp:latest | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
platforms: linux/amd64,linux/arm64/v8 | |
build_scala_images: | |
needs: build_base_images | |
strategy: | |
matrix: | |
sbt_version: [1.9.9] | |
environment: docker-hub | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Load short sha | |
uses: benjlevesque/short-sha@v2.2 | |
id: short-sha | |
with: | |
length: 7 | |
- name: Build corretto with sbt installed | |
id: docker_build_corretto_sbt | |
uses: docker/build-push-action@v4 | |
with: | |
builder: ${{ steps.buildx.outputs.name }} | |
context: ./corretto-emr-dbs-universal-spark-scala | |
file: ./corretto-emr-dbs-universal-spark-scala/Dockerfile | |
# Only Java 8 is supported for Spark | |
build-args: | | |
JDK_VERSION=8 | |
SBT_VERSION=${{ matrix.sbt_version }} | |
push: true | |
tags: | | |
infrahelpers/dpp:jdk8-sbt${{ matrix.sbt_version }} | |
infrahelpers/dpp:jdk8-sbt${{ matrix.sbt_version }}-${{ env.SHA }} | |
infrahelpers/dpp:jdk8-sbt | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
platforms: linux/amd64,linux/arm64/v8 | |
build_python_images: | |
needs: build_base_images | |
strategy: | |
matrix: | |
jdk_version: [8, 11, 17] | |
python_micro_version: [3.8.19, 3.9.19, 3.10.14, 3.11.9, 3.12.2] # Use the latest micro versions of each minor version | |
environment: docker-hub | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Extract Minor Version | |
id: extract_minor_version | |
run: | | |
minor_version=$(echo "${{ matrix.python_micro_version }}" | cut -d. -f1-2) | |
echo "minor_version=${minor_version}" >> $GITHUB_OUTPUT | |
- name: Load short sha | |
uses: benjlevesque/short-sha@v2.2 | |
id: short-sha | |
with: | |
length: 7 | |
- name: Build corretto with EMR / DBS python installed | |
id: docker_build_corretto_python | |
uses: docker/build-push-action@v4 | |
with: | |
builder: ${{ steps.buildx.outputs.name }} | |
context: ./corretto-emr-dbs-universal-pyspark | |
file: ./corretto-emr-dbs-universal-pyspark/Dockerfile | |
build-args: | | |
JDK_VERSION=${{ matrix.jdk_version }} | |
PYTHON_MINOR_VERSION=${{ steps.extract_minor_version.outputs.minor_version }} | |
PYTHON_MICRO_VERSION=${{ matrix.python_micro_version }} | |
push: true | |
tags: | | |
infrahelpers/dpp:jdk${{ matrix.jdk_version }}-python${{ steps.extract_minor_version.outputs.minor_version }} | |
infrahelpers/dpp:jdk${{ matrix.jdk_version }}-python${{ steps.extract_minor_version.outputs.minor_version }}-${{ env.SHA }} | |
infrahelpers/dpp:jdk${{ matrix.jdk_version }}-python${{ matrix.python_micro_version }} | |
infrahelpers/dpp:jdk${{ matrix.jdk_version }}-python${{ matrix.python_micro_version }}-${{ env.SHA }} | |
infrahelpers/dpp:jdk${{ matrix.jdk_version }}-python | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
platforms: linux/amd64,linux/arm64/v8 | |