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
4 changes: 1 addition & 3 deletions .github/workflows/publish-2.7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ on:
- '.github/workflows/publish-2.7.yml'
- '2.7/**'
schedule:
- cron: '0 9 * * 2,6'
- cron: '45 7 1 * *'
- cron: '0 8 9 * *'

jobs:
publish:
Expand All @@ -33,7 +32,6 @@ jobs:
with:
image: coatldev/python
version: ${{ matrix.image.version }}
build-cache: ${{ github.event.schedule == '45 7 1 * *' && 'false' || 'true' }}
variant: ${{ matrix.image.variant }}
tags: ${{ matrix.image.tags }}
username: ${{ vars.DOCKERHUB_USERNAME }}
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/publish-3.12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ on:
- '.github/workflows/publish-3.12.yml'
- '3.12/**'
schedule:
- cron: '0 9 * * 1,5'
- cron: '45 7 1 * *'
- cron: '0 8 15 * *'

jobs:
tagger:
Expand Down Expand Up @@ -60,7 +59,6 @@ jobs:
with:
image: coatldev/python
version: ${{ matrix.image.version }}
build-cache: ${{ github.event.schedule == '45 7 1 * *' && 'false' || 'true' }}
variant: ${{ matrix.image.variant }}
tags: ${{ matrix.image.tags }}
username: ${{ vars.DOCKERHUB_USERNAME }}
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/publish-3.13.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ on:
- '.github/workflows/publish-3.13.yml'
- '3.13/**'
schedule:
- cron: '0 9 * * 0,4'
- cron: '45 7 1 * *'
- cron: '0 8 16 * *'

jobs:
tagger:
Expand Down Expand Up @@ -62,7 +61,6 @@ jobs:
with:
image: coatldev/python
version: ${{ matrix.image.version }}
build-cache: ${{ github.event.schedule == '45 7 1 * *' && 'false' || 'true' }}
variant: ${{ matrix.image.variant }}
tags: ${{ matrix.image.tags }}
username: ${{ vars.DOCKERHUB_USERNAME }}
Expand Down
35 changes: 4 additions & 31 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ on:
Docker image to use as base name for tags.
required: true
type: string
build-cache:
description: >-
Use cache when building the image.
required: false
type: string
default: 'true'
version:
description: >-
Python version to release.
Expand Down Expand Up @@ -73,21 +67,8 @@ jobs:
username: ${{ inputs.username }}
password: ${{ secrets.password }}

- name: Build and push by digest (cached)
if: ${{ inputs.build-cache == 'true' }}
id: build-cache
uses: docker/build-push-action@v6
with:
cache-from: type=gha,scope=${{ inputs.version }}-${{ inputs.variant }}-${{ env.PLATFORM_PAIR }}
cache-to: type=gha,scope=${{ inputs.version }}-${{ inputs.variant }}-${{ env.PLATFORM_PAIR }},mode=max
file: ${{ inputs.version }}/${{ inputs.variant }}/Dockerfile
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=${{ inputs.image }},push-by-digest=true,name-canonical=true,push=true
platforms: ${{ matrix.builder.platform }}

- name: Build and push by digest (no cache)
if: ${{ inputs.build-cache != 'true' }}
id: build-no-cache
- name: Build and push by digest
id: build
uses: docker/build-push-action@v6
with:
file: ${{ inputs.version }}/${{ inputs.variant }}/Dockerfile
Expand All @@ -96,18 +77,10 @@ jobs:
outputs: type=image,name=${{ inputs.image }},push-by-digest=true,name-canonical=true,push=true
platforms: ${{ matrix.builder.platform }}

- name: Export digest (cached)
if: ${{ inputs.build-cache == 'true' }}
run: |
mkdir -p ${{ runner.temp }}/digests
digest="${{ steps.build-cache.outputs.digest }}"
touch "${{ runner.temp }}/digests/${digest#sha256:}"

- name: Export digest (no cache)
if: ${{ inputs.build-cache == 'false' }}
- name: Export digest
run: |
mkdir -p ${{ runner.temp }}/digests
digest="${{ steps.build-no-cache.outputs.digest }}"
digest="${{ steps.build.outputs.digest }}"
touch "${{ runner.temp }}/digests/${digest#sha256:}"

- name: Upload digest
Expand Down
2 changes: 1 addition & 1 deletion 2.7/bookworm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ RUN set -eux; \
python2 --version

# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL=https://raw.githubusercontent.com/pypa/get-pip/HEAD/public/2.7/get-pip.py
ENV PYTHON_GET_PIP_URL=https://raw.githubusercontent.com/pypa/get-pip/831b5dd0bec03caf24aa6d736a28dc2ba80f91cc/2.7/get-pip.py
ENV PYTHON_GET_PIP_SHA256=40ee07eac6674b8d60fce2bbabc148cf0e2f1408c167683f110fd608b8d6f416

RUN set -ex; \
Expand Down
2 changes: 1 addition & 1 deletion 2.7/slim-bookworm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ RUN set -eux; \
python2 --version

# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL=https://raw.githubusercontent.com/pypa/get-pip/HEAD/public/2.7/get-pip.py
ENV PYTHON_GET_PIP_URL=https://raw.githubusercontent.com/pypa/get-pip/831b5dd0bec03caf24aa6d736a28dc2ba80f91cc/2.7/get-pip.py
ENV PYTHON_GET_PIP_SHA256=40ee07eac6674b8d60fce2bbabc148cf0e2f1408c167683f110fd608b8d6f416

RUN set -ex; \
Expand Down
1 change: 0 additions & 1 deletion 3.12/bookworm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ LABEL \
ENV DEBIAN_FRONTEND=noninteractive

ENV PIP_NO_CACHE_DIR=1
ENV PIP_NO_PYTHON_VERSION_WARNING=1
ENV PIP_ROOT_USER_ACTION=ignore

# ensure local python is preferred over distribution python
Expand Down
1 change: 0 additions & 1 deletion 3.12/slim-bookworm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ LABEL \
ENV DEBIAN_FRONTEND=noninteractive

ENV PIP_NO_CACHE_DIR=1
ENV PIP_NO_PYTHON_VERSION_WARNING=1
ENV PIP_ROOT_USER_ACTION=ignore

# ensure local python is preferred over distribution python
Expand Down
1 change: 0 additions & 1 deletion 3.13/bookworm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ LABEL \
ENV DEBIAN_FRONTEND=noninteractive

ENV PIP_NO_CACHE_DIR=1
ENV PIP_NO_PYTHON_VERSION_WARNING=1
ENV PIP_ROOT_USER_ACTION=ignore

# ensure local python is preferred over distribution python
Expand Down
1 change: 0 additions & 1 deletion 3.13/slim-bookworm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ LABEL \
ENV DEBIAN_FRONTEND=noninteractive

ENV PIP_NO_CACHE_DIR=1
ENV PIP_NO_PYTHON_VERSION_WARNING=1
ENV PIP_ROOT_USER_ACTION=ignore

# ensure local python is preferred over distribution python
Expand Down