Merge pull request #941 from dimbleby/publish-wheels #1058
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: Build Docker Image | |
on: | |
push: {} | |
pull_request: {} | |
schedule: | |
# Run daily | |
- cron: "6 4 * * *" | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
env: | |
REPOSITORY_URL: ghcr.io | |
SPARKMAGIC_IMAGE_NAME: ${{ github.repository }}/jupyter:latest | |
SPARKMAGIC_DOCKERFILE: Dockerfile.jupyter | |
JUPYTER_IMAGE_NAME: ${{ github.repository }}/sparkmagic-livy:latest | |
JUPYTER_DOCKERFILE: Dockerfile.spark | |
permissions: | |
contents: read | |
packages: write | |
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 GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REPOSITORY_URL }} | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push with latest release - SparkMagic | |
uses: docker/build-push-action@v6 | |
if: github.event_name == 'schedule' | |
with: | |
context: . | |
file: ${{ env.JUPYTER_DOCKERFILE }} | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
${{ env.REPOSITORY_URL }}/${{ env.SPARKMAGIC_IMAGE_NAME }} | |
- name: Build and push with latest release - Jupyter | |
uses: docker/build-push-action@v6 | |
if: github.event_name == 'schedule' | |
with: | |
context: . | |
file: ${{ env.JUPYTER_DOCKERFILE }} | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
${{ env.REPOSITORY_URL }}/${{ env.JUPYTER_IMAGE_NAME }} | |
- name: Build and push with local packages - SparkMagic | |
uses: docker/build-push-action@v6 | |
if: github.event_name == 'push' | |
with: | |
context: . | |
file: ${{ env.JUPYTER_DOCKERFILE }} | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
build-args: | | |
dev_mode="true" | |
tags: | | |
${{ env.REPOSITORY_URL }}/${{ env.SPARKMAGIC_IMAGE_NAME }} | |
- name: Build and push with local packages - Jupyter | |
uses: docker/build-push-action@v6 | |
if: github.event_name == 'push' | |
with: | |
context: . | |
file: ${{ env.JUPYTER_DOCKERFILE }} | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
build-args: | | |
dev_mode="true" | |
tags: | | |
${{ env.REPOSITORY_URL }}/${{ env.JUPYTER_IMAGE_NAME }} |