Skip to content

Commit 3afb40e

Browse files
authored
refactor(python3): remove PIP_NO_PYTHON_VERSION_WARNING (#25)
ci: - do not cache builds - update schedule
1 parent 6952722 commit 3afb40e

File tree

10 files changed

+9
-46
lines changed

10 files changed

+9
-46
lines changed

.github/workflows/publish-2.7.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ on:
99
- '.github/workflows/publish-2.7.yml'
1010
- '2.7/**'
1111
schedule:
12-
- cron: '0 9 * * 2,6'
13-
- cron: '45 7 1 * *'
12+
- cron: '0 8 9 * *'
1413

1514
jobs:
1615
publish:
@@ -33,7 +32,6 @@ jobs:
3332
with:
3433
image: coatldev/python
3534
version: ${{ matrix.image.version }}
36-
build-cache: ${{ github.event.schedule == '45 7 1 * *' && 'false' || 'true' }}
3735
variant: ${{ matrix.image.variant }}
3836
tags: ${{ matrix.image.tags }}
3937
username: ${{ vars.DOCKERHUB_USERNAME }}

.github/workflows/publish-3.12.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ on:
99
- '.github/workflows/publish-3.12.yml'
1010
- '3.12/**'
1111
schedule:
12-
- cron: '0 9 * * 1,5'
13-
- cron: '45 7 1 * *'
12+
- cron: '0 8 15 * *'
1413

1514
jobs:
1615
tagger:
@@ -60,7 +59,6 @@ jobs:
6059
with:
6160
image: coatldev/python
6261
version: ${{ matrix.image.version }}
63-
build-cache: ${{ github.event.schedule == '45 7 1 * *' && 'false' || 'true' }}
6462
variant: ${{ matrix.image.variant }}
6563
tags: ${{ matrix.image.tags }}
6664
username: ${{ vars.DOCKERHUB_USERNAME }}

.github/workflows/publish-3.13.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ on:
99
- '.github/workflows/publish-3.13.yml'
1010
- '3.13/**'
1111
schedule:
12-
- cron: '0 9 * * 0,4'
13-
- cron: '45 7 1 * *'
12+
- cron: '0 8 16 * *'
1413

1514
jobs:
1615
tagger:
@@ -62,7 +61,6 @@ jobs:
6261
with:
6362
image: coatldev/python
6463
version: ${{ matrix.image.version }}
65-
build-cache: ${{ github.event.schedule == '45 7 1 * *' && 'false' || 'true' }}
6664
variant: ${{ matrix.image.variant }}
6765
tags: ${{ matrix.image.tags }}
6866
username: ${{ vars.DOCKERHUB_USERNAME }}

.github/workflows/publish.yml

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ on:
88
Docker image to use as base name for tags.
99
required: true
1010
type: string
11-
build-cache:
12-
description: >-
13-
Use cache when building the image.
14-
required: false
15-
type: string
16-
default: 'true'
1711
version:
1812
description: >-
1913
Python version to release.
@@ -73,21 +67,8 @@ jobs:
7367
username: ${{ inputs.username }}
7468
password: ${{ secrets.password }}
7569

76-
- name: Build and push by digest (cached)
77-
if: ${{ inputs.build-cache == 'true' }}
78-
id: build-cache
79-
uses: docker/build-push-action@v6
80-
with:
81-
cache-from: type=gha,scope=${{ inputs.version }}-${{ inputs.variant }}-${{ env.PLATFORM_PAIR }}
82-
cache-to: type=gha,scope=${{ inputs.version }}-${{ inputs.variant }}-${{ env.PLATFORM_PAIR }},mode=max
83-
file: ${{ inputs.version }}/${{ inputs.variant }}/Dockerfile
84-
labels: ${{ steps.meta.outputs.labels }}
85-
outputs: type=image,name=${{ inputs.image }},push-by-digest=true,name-canonical=true,push=true
86-
platforms: ${{ matrix.builder.platform }}
87-
88-
- name: Build and push by digest (no cache)
89-
if: ${{ inputs.build-cache != 'true' }}
90-
id: build-no-cache
70+
- name: Build and push by digest
71+
id: build
9172
uses: docker/build-push-action@v6
9273
with:
9374
file: ${{ inputs.version }}/${{ inputs.variant }}/Dockerfile
@@ -96,18 +77,10 @@ jobs:
9677
outputs: type=image,name=${{ inputs.image }},push-by-digest=true,name-canonical=true,push=true
9778
platforms: ${{ matrix.builder.platform }}
9879

99-
- name: Export digest (cached)
100-
if: ${{ inputs.build-cache == 'true' }}
101-
run: |
102-
mkdir -p ${{ runner.temp }}/digests
103-
digest="${{ steps.build-cache.outputs.digest }}"
104-
touch "${{ runner.temp }}/digests/${digest#sha256:}"
105-
106-
- name: Export digest (no cache)
107-
if: ${{ inputs.build-cache == 'false' }}
80+
- name: Export digest
10881
run: |
10982
mkdir -p ${{ runner.temp }}/digests
110-
digest="${{ steps.build-no-cache.outputs.digest }}"
83+
digest="${{ steps.build.outputs.digest }}"
11184
touch "${{ runner.temp }}/digests/${digest#sha256:}"
11285
11386
- name: Upload digest

2.7/bookworm/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ RUN set -eux; \
107107
python2 --version
108108

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

113113
RUN set -ex; \

2.7/slim-bookworm/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ RUN set -eux; \
143143
python2 --version
144144

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

149149
RUN set -ex; \

3.12/bookworm/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ LABEL \
88
ENV DEBIAN_FRONTEND=noninteractive
99

1010
ENV PIP_NO_CACHE_DIR=1
11-
ENV PIP_NO_PYTHON_VERSION_WARNING=1
1211
ENV PIP_ROOT_USER_ACTION=ignore
1312

1413
# ensure local python is preferred over distribution python

3.12/slim-bookworm/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ LABEL \
88
ENV DEBIAN_FRONTEND=noninteractive
99

1010
ENV PIP_NO_CACHE_DIR=1
11-
ENV PIP_NO_PYTHON_VERSION_WARNING=1
1211
ENV PIP_ROOT_USER_ACTION=ignore
1312

1413
# ensure local python is preferred over distribution python

3.13/bookworm/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ LABEL \
88
ENV DEBIAN_FRONTEND=noninteractive
99

1010
ENV PIP_NO_CACHE_DIR=1
11-
ENV PIP_NO_PYTHON_VERSION_WARNING=1
1211
ENV PIP_ROOT_USER_ACTION=ignore
1312

1413
# ensure local python is preferred over distribution python

3.13/slim-bookworm/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ LABEL \
88
ENV DEBIAN_FRONTEND=noninteractive
99

1010
ENV PIP_NO_CACHE_DIR=1
11-
ENV PIP_NO_PYTHON_VERSION_WARNING=1
1211
ENV PIP_ROOT_USER_ACTION=ignore
1312

1413
# ensure local python is preferred over distribution python

0 commit comments

Comments
 (0)