Skip to content

Commit 8e85377

Browse files
authored
update workflow for Python 3.14 (#305)
1 parent 3465a89 commit 8e85377

File tree

1 file changed

+64
-2
lines changed

1 file changed

+64
-2
lines changed

.github/workflows/docker-publish.yml

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ on:
99
GHCLI:
1010
description: Version of GitHub CLI
1111
required: true
12-
1312

1413
jobs:
1514
build-push:
16-
needs: python-3-12
15+
needs: python-3-13
1716
runs-on: ubuntu-latest
1817

1918
steps:
@@ -80,6 +79,69 @@ jobs:
8079
tags: ${{ steps.prep.outputs.tags }}
8180
labels: org.opencontainers.image.version=${{ steps.prep.outputs.version }}
8281

82+
python-3-13:
83+
needs: python-3-12
84+
runs-on: ubuntu-latest
85+
86+
steps:
87+
- name: Checkout
88+
uses: actions/checkout@v5
89+
with:
90+
ref: "3.13"
91+
92+
- name: Prepare
93+
id: prep
94+
run: |
95+
PYTHON_VERSION=3.13
96+
DOCKERHUB_IMAGE=cicirello/pyaction
97+
GHCR_IMAGE=ghcr.io/cicirello/pyaction
98+
VERSION=${{ github.event.inputs.GHCLI }}
99+
MINOR=${VERSION%.*}
100+
MAJOR=${VERSION%%.*}
101+
TAGS="${DOCKERHUB_IMAGE}:${PYTHON_VERSION},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${MAJOR}"
102+
TAGS="${TAGS},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${MINOR}"
103+
TAGS="${TAGS},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${VERSION}"
104+
TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${MAJOR}"
105+
TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${MINOR}"
106+
TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${VERSION}"
107+
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
108+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
109+
echo "dockerhub_image=${DOCKERHUB_IMAGE}" >> $GITHUB_OUTPUT
110+
echo "ghcr_image=${GHCR_IMAGE}" >> $GITHUB_OUTPUT
111+
112+
- name: Set up QEMU
113+
uses: docker/setup-qemu-action@v3
114+
with:
115+
platforms: all
116+
117+
- name: Set up Docker Buildx
118+
id: buildx
119+
uses: docker/setup-buildx-action@v3
120+
121+
- name: Login to DockerHub
122+
uses: docker/login-action@v3
123+
with:
124+
username: ${{ secrets.DOCKER_USERNAME }}
125+
password: ${{ secrets.DOCKER_PASSWORD }}
126+
127+
- name: Login to Github Container Registry
128+
uses: docker/login-action@v3
129+
with:
130+
registry: ghcr.io
131+
username: ${{ github.repository_owner }}
132+
password: ${{ secrets.GITHUB_TOKEN }}
133+
134+
- name: Build and push
135+
uses: docker/build-push-action@v6
136+
with:
137+
builder: ${{ steps.buildx.outputs.name }}
138+
context: .
139+
file: ./Dockerfile
140+
platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6
141+
push: true
142+
tags: ${{ steps.prep.outputs.tags }}
143+
labels: org.opencontainers.image.version=${{ steps.prep.outputs.version }}
144+
83145
python-3-12:
84146
needs: python-3-11
85147
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)