From 807bc22bbae32d35c99dc892c590cf81d55831d4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Feb 2026 11:51:28 +0000 Subject: [PATCH 1/5] Initial plan From ce3d39108fcca8110ce78a6b6caabc24fbffe1d0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Feb 2026 11:54:29 +0000 Subject: [PATCH 2/5] Use ARM runners for ARM Docker image builds Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com> --- .github/workflows/docker_build.yml | 105 +++++++++++++++++++++--- .github/workflows/docker_frankenphp.yml | 105 +++++++++++++++++++++--- 2 files changed, 184 insertions(+), 26 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index ce3243ca6..378ab6c7b 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -15,8 +15,17 @@ on: - 'v*.*.*-**' jobs: - docker: - runs-on: ubuntu-latest + build: + strategy: + matrix: + include: + - platform: linux/amd64 + runner: ubuntu-latest + - platform: linux/arm64 + runner: ubuntu-24.04-arm + - platform: linux/arm/v7 + runner: ubuntu-24.04-arm + runs-on: ${{ matrix.runner }} steps: - name: Checkout @@ -49,12 +58,9 @@ jobs: org.opencontainers.image.source=https://github.com/Part-DB/Part-DB-symfony org.opencontainers.image.authors=Jan Böhmer org.opencontainers.licenses=AGPL-3.0-or-later + flavor: | + latest=false - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - platforms: 'arm64,arm' - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -67,13 +73,86 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push + name: Build and push by digest + id: build uses: docker/build-push-action@v6 with: context: . - platforms: linux/amd64,linux/arm64,linux/arm/v7 - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.docker_meta.outputs.tags }} + platforms: ${{ matrix.platform }} labels: ${{ steps.docker_meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max + outputs: type=image,name=jbtronics/part-db1,push-by-digest=true,name-canonical=true,push=${{ github.event_name != 'pull_request' }} + cache-from: type=gha,scope=build-${{ matrix.platform }} + cache-to: type=gha,mode=max,scope=build-${{ matrix.platform }} + + - + name: Export digest + if: github.event_name != 'pull_request' + run: | + mkdir -p /tmp/digests + digest="${{ steps.build.outputs.digest }}" + touch "/tmp/digests/${digest#sha256:}" + + - + name: Upload digest + if: github.event_name != 'pull_request' + uses: actions/upload-artifact@v4 + with: + name: digests-${{ strategy.job-index }} + path: /tmp/digests/* + if-no-files-found: error + retention-days: 1 + + merge: + runs-on: ubuntu-latest + needs: + - build + if: github.event_name != 'pull_request' + steps: + - + name: Download digests + uses: actions/download-artifact@v4 + with: + path: /tmp/digests + pattern: digests-* + merge-multiple: true + + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - + name: Docker meta + id: docker_meta + uses: docker/metadata-action@v5 + with: + images: | + jbtronics/part-db1 + tags: | + type=edge,branch=master + type=ref,event=branch, + type=ref,event=tag, + type=schedule + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=ref,event=branch + type=ref,event=pr + + - + name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - + name: Create manifest list and push + working-directory: /tmp/digests + run: | + docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(printf 'jbtronics/part-db1@sha256:%s ' *) + + - + name: Inspect image + run: | + docker buildx imagetools inspect jbtronics/part-db1:${{ steps.docker_meta.outputs.version }} diff --git a/.github/workflows/docker_frankenphp.yml b/.github/workflows/docker_frankenphp.yml index 1180f0c56..7dd746ab0 100644 --- a/.github/workflows/docker_frankenphp.yml +++ b/.github/workflows/docker_frankenphp.yml @@ -15,8 +15,17 @@ on: - 'v*.*.*-**' jobs: - docker: - runs-on: ubuntu-latest + build: + strategy: + matrix: + include: + - platform: linux/amd64 + runner: ubuntu-latest + - platform: linux/arm64 + runner: ubuntu-24.04-arm + - platform: linux/arm/v7 + runner: ubuntu-24.04-arm + runs-on: ${{ matrix.runner }} steps: - name: Checkout @@ -49,12 +58,9 @@ jobs: org.opencontainers.image.source=https://github.com/Part-DB/Part-DB-server org.opencontainers.image.authors=Jan Böhmer org.opencontainers.licenses=AGPL-3.0-or-later + flavor: | + latest=false - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - with: - platforms: 'arm64,arm' - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -67,14 +73,87 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push + name: Build and push by digest + id: build uses: docker/build-push-action@v6 with: context: . file: Dockerfile-frankenphp - platforms: linux/amd64,linux/arm64,linux/arm/v7 - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.docker_meta.outputs.tags }} + platforms: ${{ matrix.platform }} labels: ${{ steps.docker_meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max + outputs: type=image,name=partdborg/part-db,push-by-digest=true,name-canonical=true,push=${{ github.event_name != 'pull_request' }} + cache-from: type=gha,scope=build-${{ matrix.platform }} + cache-to: type=gha,mode=max,scope=build-${{ matrix.platform }} + + - + name: Export digest + if: github.event_name != 'pull_request' + run: | + mkdir -p /tmp/digests + digest="${{ steps.build.outputs.digest }}" + touch "/tmp/digests/${digest#sha256:}" + + - + name: Upload digest + if: github.event_name != 'pull_request' + uses: actions/upload-artifact@v4 + with: + name: digests-${{ strategy.job-index }} + path: /tmp/digests/* + if-no-files-found: error + retention-days: 1 + + merge: + runs-on: ubuntu-latest + needs: + - build + if: github.event_name != 'pull_request' + steps: + - + name: Download digests + uses: actions/download-artifact@v4 + with: + path: /tmp/digests + pattern: digests-* + merge-multiple: true + + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - + name: Docker meta + id: docker_meta + uses: docker/metadata-action@v5 + with: + images: | + partdborg/part-db + tags: | + type=edge,branch=master + type=ref,event=branch, + type=ref,event=tag, + type=schedule + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=ref,event=branch + type=ref,event=pr + + - + name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - + name: Create manifest list and push + working-directory: /tmp/digests + run: | + docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(printf 'partdborg/part-db@sha256:%s ' *) + + - + name: Inspect image + run: | + docker buildx imagetools inspect partdborg/part-db:${{ steps.docker_meta.outputs.version }} From 5b253737b906977b3b89a2f90cee9772e4fe9f2a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Feb 2026 11:56:34 +0000 Subject: [PATCH 3/5] Fix artifact naming and add comments for latest=false flavor Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com> --- .github/workflows/docker_build.yml | 6 +++++- .github/workflows/docker_frankenphp.yml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 378ab6c7b..18626a92b 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -21,10 +21,13 @@ jobs: include: - platform: linux/amd64 runner: ubuntu-latest + platform-slug: amd64 - platform: linux/arm64 runner: ubuntu-24.04-arm + platform-slug: arm64 - platform: linux/arm/v7 runner: ubuntu-24.04-arm + platform-slug: armv7 runs-on: ${{ matrix.runner }} steps: - @@ -58,6 +61,7 @@ jobs: org.opencontainers.image.source=https://github.com/Part-DB/Part-DB-symfony org.opencontainers.image.authors=Jan Böhmer org.opencontainers.licenses=AGPL-3.0-or-later + # Disable automatic 'latest' tag in build jobs - it will be created in merge job flavor: | latest=false @@ -97,7 +101,7 @@ jobs: if: github.event_name != 'pull_request' uses: actions/upload-artifact@v4 with: - name: digests-${{ strategy.job-index }} + name: digests-${{ matrix.platform-slug }} path: /tmp/digests/* if-no-files-found: error retention-days: 1 diff --git a/.github/workflows/docker_frankenphp.yml b/.github/workflows/docker_frankenphp.yml index 7dd746ab0..0897c20b6 100644 --- a/.github/workflows/docker_frankenphp.yml +++ b/.github/workflows/docker_frankenphp.yml @@ -21,10 +21,13 @@ jobs: include: - platform: linux/amd64 runner: ubuntu-latest + platform-slug: amd64 - platform: linux/arm64 runner: ubuntu-24.04-arm + platform-slug: arm64 - platform: linux/arm/v7 runner: ubuntu-24.04-arm + platform-slug: armv7 runs-on: ${{ matrix.runner }} steps: - @@ -58,6 +61,7 @@ jobs: org.opencontainers.image.source=https://github.com/Part-DB/Part-DB-server org.opencontainers.image.authors=Jan Böhmer org.opencontainers.licenses=AGPL-3.0-or-later + # Disable automatic 'latest' tag in build jobs - it will be created in merge job flavor: | latest=false @@ -98,7 +102,7 @@ jobs: if: github.event_name != 'pull_request' uses: actions/upload-artifact@v4 with: - name: digests-${{ strategy.job-index }} + name: digests-${{ matrix.platform-slug }} path: /tmp/digests/* if-no-files-found: error retention-days: 1 From a5ba915d79f9e3bbde045186a3db2d06fc8398f9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Feb 2026 11:57:45 +0000 Subject: [PATCH 4/5] Remove trailing commas from tag configuration in merge job Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com> --- .github/workflows/docker_build.yml | 4 ++-- .github/workflows/docker_frankenphp.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 18626a92b..afa0237a4 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -133,8 +133,8 @@ jobs: jbtronics/part-db1 tags: | type=edge,branch=master - type=ref,event=branch, - type=ref,event=tag, + type=ref,event=branch + type=ref,event=tag type=schedule type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} diff --git a/.github/workflows/docker_frankenphp.yml b/.github/workflows/docker_frankenphp.yml index 0897c20b6..c9f4989e8 100644 --- a/.github/workflows/docker_frankenphp.yml +++ b/.github/workflows/docker_frankenphp.yml @@ -134,8 +134,8 @@ jobs: partdborg/part-db tags: | type=edge,branch=master - type=ref,event=branch, - type=ref,event=tag, + type=ref,event=branch + type=ref,event=tag type=schedule type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} From 8ebc822ed73b673c299e1a6be98f8cfd6fd863b8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 16 Feb 2026 11:58:53 +0000 Subject: [PATCH 5/5] Remove duplicate tag entries and clean up configuration Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com> --- .github/workflows/docker_build.yml | 6 ++---- .github/workflows/docker_frankenphp.yml | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index afa0237a4..2e0d533c3 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -44,13 +44,12 @@ jobs: # Mark the image build from master as latest (as we dont have really releases yet) tags: | type=edge,branch=master - type=ref,event=branch, - type=ref,event=tag, + type=ref,event=branch + type=ref,event=tag type=schedule type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} - type=ref,event=branch type=ref,event=pr labels: | org.opencontainers.image.source=${{ github.event.repository.clone_url }} @@ -139,7 +138,6 @@ jobs: type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} - type=ref,event=branch type=ref,event=pr - diff --git a/.github/workflows/docker_frankenphp.yml b/.github/workflows/docker_frankenphp.yml index c9f4989e8..10e62dfc1 100644 --- a/.github/workflows/docker_frankenphp.yml +++ b/.github/workflows/docker_frankenphp.yml @@ -44,13 +44,12 @@ jobs: # Mark the image build from master as latest (as we dont have really releases yet) tags: | type=edge,branch=master - type=ref,event=branch, - type=ref,event=tag, + type=ref,event=branch + type=ref,event=tag type=schedule type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} - type=ref,event=branch type=ref,event=pr labels: | org.opencontainers.image.source=${{ github.event.repository.clone_url }} @@ -140,7 +139,6 @@ jobs: type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} - type=ref,event=branch type=ref,event=pr -