Skip to content

feat(build): multi-arch builds + pinned actions#28

Open
Ayesh wants to merge 2 commits into
linkorb:masterfrom
Ayesh:feat/multi-arch-and-more
Open

feat(build): multi-arch builds + pinned actions#28
Ayesh wants to merge 2 commits into
linkorb:masterfrom
Ayesh:feat/multi-arch-and-more

Conversation

@Ayesh

@Ayesh Ayesh commented Jul 5, 2026

Copy link
Copy Markdown
Member

This is a rather large commit that makes several improvements to how the php-docker-base images are built and cleaned up.

Multi-arch images

Although these images are used in linux x64 servers, developers could be running on other CPU architectures. For example, some of our friends and colleagues (and @Ayesh himself after he spilled water on his X64 laptop) use Mac Books that lately use Arm64 CPUs (Apple Sillicon M series).

Right now, downstream projects such as Onatal, Onatal-API, Plaza, Peri-connect, etc use this image, but on Arm64, it has to emulate Amd64 (x64), which can be slow. On M series, this has no noticeable slow down, but the author of this PR has too much time on his rainy Sunday evening, and this PR proposes to build Amd64 and Arm64 images using native GitHub runners, and merge those images and tag them.

This ensures that once the images are rebuilt, on the next fresh, any consumer that use the php-docker-base image will pull an Arm64 image instead of emulating the Amd64 image.

Pinning third-part action SHAs

This combines the external actions in the production.yaml workflow to the pinned versions. They are identical versions used in linkorb/repo-ansible as at v0.25.0.

Checkout with persist-credentials: false

Combines security improvement suggested in linkorb/repo-ansible#165.

Using docker/* actions

Instead of calling docker commands directly in bash, this PR suggests to use relevant docker/ GitHub reusable actions.

The same version+shasums are used here as repo-ansible.

Why a big PR?

This combines SHA pinning + docker/ action migration, and multi-arch builds in one PR. If I were to do this one by one, it will have to be in a merge queue, increasing the merge and review times.

This also aims to bring us to the final goal immediately, instead of doin it in smaller steps that cannot convey the final goal that easily.

Checklist

  • Breaking change: fix or feature that would cause existing functionality to not work as expected
  • I have read the Contributing doc
  • I have read the Creating and reviewing pull requests at LinkORB guide doc
  • Lint and unit tests pass locally with my changes
  • I have added/updated necessary documentation in the README.md or doc/ directories (if appropriate)

Ayesh added 2 commits July 6, 2026 01:39
This is a rather large commit that makes several improvements
to how the `php-docker-base` images are built and cleaned up.

Multi-arch images
=================

Although these images are used in linux x64 servers, developers
could be running on other CPU architectures. For example, some
of our friends and colleagues (and @Ayesh himself after he spilled
water on his X64 laptop) use Mac Books that lately use Arm64
CPUs (Apple Sillicon M series).

Right now, downstream projects such as Onatal, Onatal-API, Plaza,
Peri-connect, etc use this image, but on Arm64, it has to emulate
Amd64 (x64), which can be slow. On M series, this has no noticeable
slow down, but the author of this PR has too much time on his rainy
Sunday evening, and this PR proposes to build Amd64 and Arm64 images
using native GitHub runners, and merge those images and tag them.

This ensures that once the images are rebuilt, on the next fresh,
any consumer that use the `php-docker-base` image will pull an
Arm64 image instead of emulating the Amd64 image.

Pinning third-part action SHAs
==============================

This combines the external actions in the `production.yaml` workflow
to the pinned versions. They are identical versions used in
linkorb/repo-ansible as at v0.25.0.

Checkout with `persist-credentials: false`
=========================================

Combines security improvement suggested in linkorb/repo-ansible#165.

Using `docker/*` actions
========================

Instead of calling `docker` commands directly in bash, this PR
suggests to use relevant `docker/` GitHub reusable actions.

The same version+shasums are used here as repo-ansible.

Why a big PR?
=============

This combines SHA pinning + `docker/` action migration, and
multi-arch builds in one PR. If I were to do this one by one,
it will have to be in a merge queue, increasing the merge and
review times.

This also aims to bring us to the final goal immediately,
instead of doin it in smaller steps that cannot convey the
final goal that easily.
@Ayesh

Ayesh commented Jul 5, 2026

Copy link
Copy Markdown
Member Author

Build matrix:

Screenshot 2026-07-06 at 01 15 16

GHCR multi-arch images:

image

Sample Run log (from fork): https://github.com/Ayesh/php-docker-base/actions/runs/28750759020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant