Skip to content

Build and Push Spark Images #271

Build and Push Spark Images

Build and Push Spark Images #271

name: Build and Push Spark Images
on:
push:
branches:
- "main"
schedule:
- cron: "0 7 * * *"
jobs:
spark-builder:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: set env
run: echo "NOW=$(date +'%d%m%Y')" >> $GITHUB_ENV
# New Build and Push for spark-builder
- name: Build and push spark-builder
uses: docker/build-push-action@v5
with:
context: spark-builder/.
push: true
tags: bjornjorgensen/spark-builder:${{ env.NOW }}, bjornjorgensen/spark-builder:latest
spark-worker-and-driver:
needs: spark-builder
runs-on: ubuntu-latest
strategy:
matrix:
component: [worker, driver]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: set env
run: echo "NOW=$(date +'%d%m%Y')" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ${{ matrix.component }}/.
push: true
tags: bjornjorgensen/spark-${{ matrix.component }}:${{ env.NOW }}, bjornjorgensen/spark-${{ matrix.component }}:latest