Skip to content

Commit 8288c65

Browse files
authored
ci(publish): use coatl-dev/workflows/docker-build-push-multi-platform (#1)
1 parent b1e827a commit 8288c65

File tree

2 files changed

+14
-32
lines changed

2 files changed

+14
-32
lines changed

.github/workflows/publish.yml

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ on:
1111
- cron: '0 8 14,28 * *'
1212

1313
jobs:
14-
docker:
15-
runs-on: ubuntu-latest
14+
publish:
15+
uses: coatl-dev/workflows/.github/workflows/docker-build-push-multi-platform.yml@v4
1616
strategy:
1717
matrix:
1818
image:
@@ -32,31 +32,13 @@ jobs:
3232
2.7-slim-bookworm
3333
2.7.18-slim
3434
2.7.18-slim-bookworm
35-
steps:
36-
- name: Set up QEMU
37-
uses: docker/setup-qemu-action@v3
38-
39-
- name: Set up Docker Buildx
40-
uses: docker/setup-buildx-action@v3
41-
42-
- name: Login to Docker Hub
43-
uses: docker/login-action@v3
44-
with:
45-
username: ${{ vars.DOCKERHUB_USERNAME }}
46-
password: ${{ secrets.DOCKERHUB_TOKEN }}
47-
48-
- name: Docker meta
49-
id: meta
50-
uses: docker/metadata-action@v5
51-
with:
52-
images: coatldev/python
53-
tags: |
54-
${{ matrix.image.tags }}
55-
56-
- name: Build and push
57-
uses: docker/build-push-action@v6
58-
with:
59-
file: ${{ matrix.image.version }}/${{ matrix.image.variant }}/Dockerfile
60-
platforms: linux/amd64,linux/arm64
61-
push: true
62-
tags: ${{ steps.meta.outputs.tags }}
35+
with:
36+
registry-image: coatldev/python
37+
metadata-tags: |
38+
${{ matrix.image.tags }}
39+
registry-username: ${{ vars.DOCKERHUB_USERNAME }}
40+
build-file: ${{ matrix.image.version }}/${{ matrix.image.variant }}/Dockerfile
41+
build-cache-key: ${{ matrix.image.version }}-${{ matrix.image.variant }}
42+
build-digest-key: ${{ matrix.image.version }}-${{ matrix.image.variant }}
43+
secrets:
44+
registry-password: ${{ secrets.DOCKERHUB_TOKEN }}

2.7/slim-bookworm/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
4242
RUN set -eux; \
4343
\
4444
savedAptMark="$(apt-mark showmanual)"; \
45-
apt-get update; \
45+
apt-get update --quiet; \
4646
apt-get install --yes --no-install-recommends \
4747
dpkg-dev \
4848
gcc \
@@ -155,7 +155,7 @@ ENV PYTHON_GET_PIP_SHA256=40ee07eac6674b8d60fce2bbabc148cf0e2f1408c167683f110fd6
155155
RUN set -ex; \
156156
\
157157
savedAptMark="$(apt-mark showmanual)"; \
158-
apt-get update; \
158+
apt-get update --quiet; \
159159
apt-get install --yes --no-install-recommends wget; \
160160
\
161161
wget -q -O get-pip.py "$PYTHON_GET_PIP_URL"; \

0 commit comments

Comments
 (0)