Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
jobs:
should_build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.12"
- "3.13"
steps:
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -17,8 +22,10 @@ jobs:
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
build-args: |
GO_VERSION=${{ matrix.python-version }}
cache-from: type=gha
platforms: linux/amd64 # GitHub only offers AMD64 codespaces
pull: true
31 changes: 28 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,17 @@ on:
branches:
- main

env:
LATEST_PYTHON_VERSION: "3.13"

jobs:
build_and_upload_image:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.12"
- "3.13"
steps:
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -20,15 +28,32 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build and Push
uses: docker/build-push-action@v5
- name: Build and Push Image
if: ${{ matrix.python-version != env.LATEST_PYTHON_VERSION }}
uses: docker/build-push-action@v6
with:
build-args: |
PYTHON_VERSION=${{ matrix.python-version }}
platforms: linux/amd64 # GitHub only offers AMD64 codespaces
pull: true
push: true
tags: ghcr.io/${{ github.repository }}:latest
tags: ghcr.io/${{ github.repository }}:${{ matrix.python-version }}
cache-from: type=gha
# mode=max means "cache everything possible". This ensures maximum
# use of the cache, but will use up GitHub's 10 GB cache size limit
# faster.
cache-to: type=gha,mode=max
- name: Build and Push 'latest' Image
if: ${{ matrix.python-version == env.LATEST_PYTHON_VERSION }}
uses: docker/build-push-action@v6
with:
build-args: |
PYTHON_VERSION=${{ matrix.python-version }}
platforms: linux/amd64 # GitHub only offers AMD64 codespaces
pull: true
push: true
tags: ghcr.io/${{ github.repository }}:${{ matrix.python-version }},ghcr.io/${{ github.repository }}:latest
cache-from: type=gha
# mode=max means "cache everything possible". This ensures maximum
# use of the cache, but will use up GitHub's 10 GB cache size limit
# faster.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
ARG PYTHON_VERSION="3.12"
ARG PYTHON_VERSION="3.13"
FROM mcr.microsoft.com/devcontainers/python:${PYTHON_VERSION}

LABEL org.opencontainers.image.authors="Ryan Boehning <1250684+ryboe@users.noreply.github.com>"
Expand Down
Loading