Skip to content

Docker Image CI

Docker Image CI #483

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: "0 18 * * FRI"
- cron: "0 18 * * WED"
jobs:
base:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- tag: base
context: base
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Login to hub.docker.io Container Registry
uses: docker/login-action@v1
with:
username: mosquito
password: ${{ secrets.DH_TOKEN }}
- uses: docker/build-push-action@v2
with:
context: ${{ matrix.image.context }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
cache-from: type=gha
cache-to: type=gha,mode=max
push: ${{ github.ref == 'refs/heads/master' }}
pull: true
shm-size: 4G
tags: ghcr.io/snakepacker/python/${{ matrix.image.tag }},ghcr.io/snakepacker/python:${{ matrix.image.tag }},snakepacker/python:${{ matrix.image.tag }}
images:
needs: base
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- context: "all"
tag: "all"
- context: "python3.8"
tag: "3.8"
- context: "python3.9"
tag: "3.9"
- context: "python3.10"
tag: "3.10"
- context: "python3.11"
tag: "3.11"
- context: "python3.12"
tag: "3.12"
- context: "python3.13"
tag: "3.13"
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Login to hub.docker.io Container Registry
uses: docker/login-action@v1
with:
username: mosquito
password: ${{ secrets.DH_TOKEN }}
- uses: docker/build-push-action@v4
with:
context: ${{ matrix.image.context }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
cache-from: type=gha
cache-to: type=gha,mode=max
push: ${{ github.ref == 'refs/heads/master' }}
pull: true
shm-size: 4G
tags: ghcr.io/snakepacker/python/${{ matrix.image.tag }},ghcr.io/snakepacker/python:${{ matrix.image.tag }},snakepacker/python:${{ matrix.image.tag }}
images-pillow:
needs: images
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- context: pillow/3.8
tag: 3.8-pillow
- context: pillow/3.9
tag: 3.9-pillow
- context: pillow/3.10
tag: 3.10-pillow
- context: pillow/3.11
tag: 3.11-pillow
- context: pillow/3.12
tag: 3.12-pillow
- context: pillow/3.13
tag: 3.13-pillow
- context: pillow/all
tag: all-pillow
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Login to hub.docker.io Container Registry
uses: docker/login-action@v1
with:
username: mosquito
password: ${{ secrets.DH_TOKEN }}
- uses: docker/build-push-action@v4
with:
context: ${{ matrix.image.context }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
cache-from: type=gha
cache-to: type=gha,mode=max
push: ${{ github.ref == 'refs/heads/master' }}
pull: true
shm-size: 4G
tags: ghcr.io/snakepacker/python/${{ matrix.image.tag }},ghcr.io/snakepacker/python:${{ matrix.image.tag }},snakepacker/python:${{ matrix.image.tag }}
apps:
needs:
- images
- images-pillow
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- context: ipython
tag: ipython
- context: pylama
tag: pylama
- context: pylava
tag: pylava
- context: certbot
tag: certbot
- context: black
tag: black
- context: gray
tag: gray
- context: ruff
tag: ruff
- context: jupyterlab
tag: jupyterlab
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Login to hub.docker.io Container Registry
uses: docker/login-action@v1
with:
username: mosquito
password: ${{ secrets.DH_TOKEN }}
- uses: docker/build-push-action@v4
with:
context: ${{ matrix.image.context }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
cache-from: type=gha
cache-to: type=gha,mode=max
push: ${{ github.ref == 'refs/heads/master' }}
pull: true
shm-size: 4G
tags: ghcr.io/snakepacker/python/${{ matrix.image.tag }},ghcr.io/snakepacker/python:${{ matrix.image.tag }},snakepacker/python:${{ matrix.image.tag }}