From 114fe916790b5fb549a65884a2c70ab7df89a9c4 Mon Sep 17 00:00:00 2001 From: benoit74 Date: Mon, 30 Nov 2026 17:06:41 +0000 Subject: [PATCH] Use openzim/overview's reusable docker-publish workflow [openzim/docker-publish-action](https://github.com/openzim/docker-publish-action) is deprecated (openzim/docker-publish-action#10). Image building and publishing now goes through the reusable workflow in [openzim/overview](https://github.com/openzim/overview/blob/main/.github/workflows/docker-publish.yaml), which builds each architecture on its own native runner and merges the digests into a single multi-arch manifest. What the rewrite does, per [the migration guide](https://github.com/openzim/overview/wiki/Publishing-Docker-images#migrating-from-docker-publish-action): - the publishing step becomes a job calling the reusable workflow (a `uses:` job cannot hold `steps`, so anything else the job did stays in its own job, wired with `needs:` to keep the original ordering) - `restrict-to` becomes an `if: github.repository == ...` guard on the job - `credentials` becomes the `ghcr_username` / `ghcr_token` secrets - `on-master` is renamed `on-main` (same meaning: the repository's default branch) - `registries`, `repo_description` and `repo_overview` are dropped: they only ever mattered for docker.io, which this repository does not publish to Image names, tags, platforms, context, Dockerfile and build args are unchanged. --- .github/workflows/Publish.yaml | 25 +++++++++--------- .github/workflows/PublishDockerDevImage.yaml | 27 +++++++------------- 2 files changed, 21 insertions(+), 31 deletions(-) diff --git a/.github/workflows/Publish.yaml b/.github/workflows/Publish.yaml index 652eb8a..935e417 100644 --- a/.github/workflows/Publish.yaml +++ b/.github/workflows/Publish.yaml @@ -27,16 +27,15 @@ jobs: - name: Upload to PyPI uses: pypa/gh-action-pypi-publish@release/v1.13 - - name: Build and push Docker image - uses: openzim/docker-publish-action@v10 - with: - image-name: openzim/devdocs - tag-pattern: /^v([0-9.]+)$/ - latest-on-tag: true - restrict-to: openzim/devdocs - registries: ghcr.io - credentials: - GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }} - GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }} - repo_description: auto - repo_overview: auto + docker-publish: + name: Build and push Docker image + if: github.repository == 'openzim/devdocs' + needs: publish + uses: openzim/overview/.github/workflows/docker-publish.yaml@v1 + with: + image-name: openzim/devdocs + tag-pattern: /^v([0-9.]+)$/ + latest-on-tag: true + secrets: + ghcr_username: ${{ secrets.GHCR_USERNAME }} + ghcr_token: ${{ secrets.GHCR_TOKEN }} diff --git a/.github/workflows/PublishDockerDevImage.yaml b/.github/workflows/PublishDockerDevImage.yaml index edca14a..cbc0845 100644 --- a/.github/workflows/PublishDockerDevImage.yaml +++ b/.github/workflows/PublishDockerDevImage.yaml @@ -7,21 +7,12 @@ on: jobs: publish: - runs-on: ubuntu-24.04 - - steps: - - uses: actions/checkout@v6 - - - name: Build and push Docker image - uses: openzim/docker-publish-action@v10 - with: - image-name: openzim/devdocs - manual-tag: dev - latest-on-tag: false - restrict-to: openzim/devdocs - registries: ghcr.io - credentials: - GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }} - GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }} - repo_description: auto - repo_overview: auto + if: github.repository == 'openzim/devdocs' + uses: openzim/overview/.github/workflows/docker-publish.yaml@v1 + with: + image-name: openzim/devdocs + latest-on-tag: false + manual-tag: dev + secrets: + ghcr_username: ${{ secrets.GHCR_USERNAME }} + ghcr_token: ${{ secrets.GHCR_TOKEN }}