Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0391a4af8 | ||
|
|
af008d7785 | ||
|
|
4e86a99eb1 | ||
|
|
b0c8ec9683 | ||
|
|
02f3548bd3 | ||
|
|
6c57250ec3 | ||
|
|
0cff3b373e | ||
|
|
737d5c58d7 | ||
|
|
af8e8a37e5 | ||
|
|
6bf0b3d0d7 |
No files matched your search
@@ -39,7 +39,7 @@ jobs:
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
|
||||
# Inputs reach the shell via env only, and are regex-checked before use.
|
||||
- name: Validate inputs
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
echo "attach arm64 to ${IN_IMAGE}:php${IN_PHPVER} (force=${IN_FORCE:-false})"
|
||||
|
||||
- name: Login to Gitea
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
|
||||
with:
|
||||
registry: repo.anhonesthost.net
|
||||
username: ${{ secrets.CI_USER }}
|
||||
@@ -104,13 +104,13 @@ jobs:
|
||||
echo "mirror=${mirror}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
|
||||
with:
|
||||
platforms: arm64
|
||||
|
||||
- name: Set up Docker Buildx (Docker Hub via pkg-cache mirror)
|
||||
if: steps.pkgcache.outputs.mirror != ''
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
||||
with:
|
||||
buildkitd-config-inline: |
|
||||
[registry."docker.io"]
|
||||
@@ -120,7 +120,7 @@ jobs:
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
if: steps.pkgcache.outputs.mirror == ''
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
||||
|
||||
# (needs the buildx plugin, hence after the Buildx setup) Cheap pre-check BEFORE the long build: tag exists, has exactly one amd64 entry,
|
||||
# and has no arm64 entry yet (exit 3 otherwise). Writes nothing. The index digest read here
|
||||
@@ -133,6 +133,7 @@ jobs:
|
||||
FORCE: ${{ steps.v.outputs.force }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
docker buildx version
|
||||
f=(); [ "$FORCE" = true ] && f=(--force)
|
||||
scripts/attach-arm64-index.sh --repo "$REPO" --tag "$TAG" --plan-only "${f[@]}"
|
||||
|
||||
@@ -161,7 +162,7 @@ jobs:
|
||||
- name: Build arm64 (push by digest)
|
||||
id: arm64
|
||||
timeout-minutes: 60
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
|
||||
with:
|
||||
file: ./${{ steps.v.outputs.dockerfile }}
|
||||
platforms: linux/arm64
|
||||
@@ -200,7 +201,13 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
want=$(docker run --rm --platform linux/amd64 --entrypoint php "$REPO@$AMD64" -r 'echo PHP_VERSION;')
|
||||
got=$(docker run --rm --platform linux/arm64 --entrypoint php "$REPO@$ARM64_DIGEST" -r 'echo PHP_VERSION;')
|
||||
# `docker run` of an arm64 image fails on this runner ("exec format error": no binfmt for the
|
||||
# daemon), but BuildKit runs arm64 RUN steps under QEMU (that is how the image was built):
|
||||
# run php in a throwaway build and export just the version file.
|
||||
out=$(mktemp -d); ctx=$(mktemp -d)
|
||||
printf 'FROM %s@%s AS src\nRUN php -r '"'"'echo PHP_VERSION;'"'"' > /pv\nFROM scratch\nCOPY --from=src /pv /pv\n' "$REPO" "$ARM64_DIGEST" |
|
||||
docker buildx build --platform linux/arm64 --output "type=local,dest=$out" -f - "$ctx"
|
||||
got=$(cat "$out/pv")
|
||||
echo "amd64 (existing tag) PHP ${want}; new arm64 PHP ${got}"
|
||||
[[ "$want" =~ ^[0-9]+\.[0-9]+\.[0-9]+ ]] || { echo "::error::cannot read the amd64 PHP version"; exit 1; }
|
||||
[ "$want" = "$got" ] || { echo "::error::PHP version differs between the existing amd64 (${want}) and the new arm64 (${got}); not attaching. The amd64 image needs a rebuild first."; exit 1; }
|
||||
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
|
||||
# Runner images differ on whether they are root and whether sudo exists.
|
||||
- name: Install shellcheck
|
||||
@@ -152,7 +152,7 @@ jobs:
|
||||
shared_ols: ${{ steps.plan.outputs.shared_ols }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
|
||||
- name: Plan legs
|
||||
id: plan
|
||||
@@ -179,7 +179,7 @@ jobs:
|
||||
phpver: ${{ fromJSON(needs.plan.outputs.cac) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
|
||||
# Base image pinned by DIGEST, looked up directly at Docker Hub (never via
|
||||
# the pkg-cache mirror), so the mirror can only serve content-addressed
|
||||
@@ -221,7 +221,7 @@ jobs:
|
||||
echo "mirror=${mirror}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
|
||||
with:
|
||||
platforms: arm64
|
||||
|
||||
@@ -230,7 +230,7 @@ jobs:
|
||||
# back to Docker Hub if the mirror stops answering mid-run.
|
||||
- name: Set up Docker Buildx (Docker Hub via pkg-cache mirror)
|
||||
if: steps.pkgcache.outputs.mirror != ''
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
||||
with:
|
||||
buildkitd-config-inline: |
|
||||
[registry."docker.io"]
|
||||
@@ -240,7 +240,7 @@ jobs:
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
if: steps.pkgcache.outputs.mirror == ''
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
||||
|
||||
# Per-run cache-bust value. Each job's buildx builder is created fresh by
|
||||
# setup-buildx-action (no cache-from/cache-to here), so today nothing is
|
||||
@@ -272,7 +272,7 @@ jobs:
|
||||
echo "min=${min}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Login to Gitea
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
|
||||
with:
|
||||
registry: repo.anhonesthost.net
|
||||
username: ${{ secrets.CI_USER }}
|
||||
@@ -283,7 +283,7 @@ jobs:
|
||||
# created by the assemble step below.
|
||||
- name: Build amd64 (push by digest)
|
||||
id: amd64
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
build-args: |
|
||||
@@ -303,7 +303,7 @@ jobs:
|
||||
id: arm64
|
||||
continue-on-error: true
|
||||
timeout-minutes: 45
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
|
||||
with:
|
||||
platforms: linux/arm64
|
||||
build-args: |
|
||||
@@ -324,7 +324,7 @@ jobs:
|
||||
if: steps.arm64.outcome == 'failure'
|
||||
continue-on-error: true
|
||||
timeout-minutes: 45
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
|
||||
with:
|
||||
platforms: linux/arm64
|
||||
build-args: |
|
||||
@@ -375,7 +375,7 @@ jobs:
|
||||
phpver: ${{ fromJSON(needs.plan.outputs.cac_fpm) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
|
||||
# Base image pinned by DIGEST, looked up directly at Docker Hub (never via
|
||||
# the pkg-cache mirror), so the mirror can only serve content-addressed
|
||||
@@ -417,7 +417,7 @@ jobs:
|
||||
echo "mirror=${mirror}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
|
||||
with:
|
||||
platforms: arm64
|
||||
|
||||
@@ -426,7 +426,7 @@ jobs:
|
||||
# back to Docker Hub if the mirror stops answering mid-run.
|
||||
- name: Set up Docker Buildx (Docker Hub via pkg-cache mirror)
|
||||
if: steps.pkgcache.outputs.mirror != ''
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
||||
with:
|
||||
buildkitd-config-inline: |
|
||||
[registry."docker.io"]
|
||||
@@ -436,7 +436,7 @@ jobs:
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
if: steps.pkgcache.outputs.mirror == ''
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
||||
|
||||
# Per-run cache-bust value. Each job's buildx builder is created fresh by
|
||||
# setup-buildx-action (no cache-from/cache-to here), so today nothing is
|
||||
@@ -468,7 +468,7 @@ jobs:
|
||||
echo "min=${min}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Login to Gitea
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
|
||||
with:
|
||||
registry: repo.anhonesthost.net
|
||||
username: ${{ secrets.CI_USER }}
|
||||
@@ -479,7 +479,7 @@ jobs:
|
||||
# created by the assemble step below.
|
||||
- name: Build amd64 (push by digest)
|
||||
id: amd64
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
|
||||
with:
|
||||
file: ./Dockerfile.fpm
|
||||
platforms: linux/amd64
|
||||
@@ -500,7 +500,7 @@ jobs:
|
||||
id: arm64
|
||||
continue-on-error: true
|
||||
timeout-minutes: 45
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
|
||||
with:
|
||||
file: ./Dockerfile.fpm
|
||||
platforms: linux/arm64
|
||||
@@ -522,7 +522,7 @@ jobs:
|
||||
if: steps.arm64.outcome == 'failure'
|
||||
continue-on-error: true
|
||||
timeout-minutes: 45
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
|
||||
with:
|
||||
file: ./Dockerfile.fpm
|
||||
platforms: linux/arm64
|
||||
@@ -575,7 +575,7 @@ jobs:
|
||||
phpver: ${{ fromJSON(needs.plan.outputs.cac_litespeed) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
|
||||
# Base image pinned by DIGEST, looked up directly at Docker Hub (never via
|
||||
# the pkg-cache mirror), so the mirror can only serve content-addressed
|
||||
@@ -617,14 +617,14 @@ jobs:
|
||||
echo "mirror=${mirror}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
|
||||
|
||||
# BuildKit (docker-container driver) ignores dockerd's registry-mirrors,
|
||||
# so the mirror is configured on the builder; BuildKit itself still falls
|
||||
# back to Docker Hub if the mirror stops answering mid-run.
|
||||
- name: Set up Docker Buildx (Docker Hub via pkg-cache mirror)
|
||||
if: steps.pkgcache.outputs.mirror != ''
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
||||
with:
|
||||
buildkitd-config-inline: |
|
||||
[registry."docker.io"]
|
||||
@@ -634,7 +634,7 @@ jobs:
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
if: steps.pkgcache.outputs.mirror == ''
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
||||
|
||||
# Per-run cache-bust value. Each job's buildx builder is created fresh by
|
||||
# setup-buildx-action (no cache-from/cache-to here), so today nothing is
|
||||
@@ -668,7 +668,7 @@ jobs:
|
||||
echo "php=${php}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Login to Gitea
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
|
||||
with:
|
||||
registry: repo.anhonesthost.net
|
||||
username: ${{ secrets.CI_USER }}
|
||||
@@ -692,7 +692,7 @@ jobs:
|
||||
./scripts/php-emergency-guard.sh "$ref" "$NEW_PHP"
|
||||
|
||||
- name: Build and Push LiteSpeed Image
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
|
||||
with:
|
||||
file: ./Dockerfile.litespeed
|
||||
platforms: linux/amd64
|
||||
@@ -733,7 +733,7 @@ jobs:
|
||||
phpver: ${{ fromJSON(needs.plan.outputs.cac_lsphp) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
|
||||
# Base image pinned by DIGEST, looked up directly at Docker Hub (never via
|
||||
# the pkg-cache mirror), so the mirror can only serve content-addressed
|
||||
@@ -775,14 +775,14 @@ jobs:
|
||||
echo "mirror=${mirror}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
|
||||
|
||||
# BuildKit (docker-container driver) ignores dockerd's registry-mirrors,
|
||||
# so the mirror is configured on the builder; BuildKit itself still falls
|
||||
# back to Docker Hub if the mirror stops answering mid-run.
|
||||
- name: Set up Docker Buildx (Docker Hub via pkg-cache mirror)
|
||||
if: steps.pkgcache.outputs.mirror != ''
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
||||
with:
|
||||
buildkitd-config-inline: |
|
||||
[registry."docker.io"]
|
||||
@@ -792,7 +792,7 @@ jobs:
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
if: steps.pkgcache.outputs.mirror == ''
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
||||
|
||||
# Per-run cache-bust value. Each job's buildx builder is created fresh by
|
||||
# setup-buildx-action (no cache-from/cache-to here), so today nothing is
|
||||
@@ -826,7 +826,7 @@ jobs:
|
||||
echo "php=${php}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Login to Gitea
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
|
||||
with:
|
||||
registry: repo.anhonesthost.net
|
||||
username: ${{ secrets.CI_USER }}
|
||||
@@ -850,7 +850,7 @@ jobs:
|
||||
./scripts/php-emergency-guard.sh "$ref" "$NEW_PHP"
|
||||
|
||||
- name: Build and Push lsphp Image
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
|
||||
with:
|
||||
file: ./Dockerfile.lsphp
|
||||
platforms: linux/amd64
|
||||
@@ -876,7 +876,7 @@ jobs:
|
||||
timeout-minutes: 80
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
|
||||
# Base image pinned by DIGEST, looked up directly at Docker Hub (never via
|
||||
# the pkg-cache mirror), so the mirror can only serve content-addressed
|
||||
@@ -918,7 +918,7 @@ jobs:
|
||||
echo "mirror=${mirror}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
|
||||
with:
|
||||
platforms: arm64
|
||||
|
||||
@@ -927,7 +927,7 @@ jobs:
|
||||
# back to Docker Hub if the mirror stops answering mid-run.
|
||||
- name: Set up Docker Buildx (Docker Hub via pkg-cache mirror)
|
||||
if: steps.pkgcache.outputs.mirror != ''
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
||||
with:
|
||||
buildkitd-config-inline: |
|
||||
[registry."docker.io"]
|
||||
@@ -937,10 +937,10 @@ jobs:
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
if: steps.pkgcache.outputs.mirror == ''
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
||||
|
||||
- name: Login to Gitea
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
|
||||
with:
|
||||
registry: repo.anhonesthost.net
|
||||
username: ${{ secrets.CI_USER }}
|
||||
@@ -951,7 +951,7 @@ jobs:
|
||||
# created by the assemble step below.
|
||||
- name: Build amd64 (push by digest)
|
||||
id: amd64
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
|
||||
with:
|
||||
file: ./Dockerfile.shared-httpd
|
||||
platforms: linux/amd64
|
||||
@@ -969,7 +969,7 @@ jobs:
|
||||
id: arm64
|
||||
continue-on-error: true
|
||||
timeout-minutes: 25
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
|
||||
with:
|
||||
file: ./Dockerfile.shared-httpd
|
||||
platforms: linux/arm64
|
||||
@@ -988,7 +988,7 @@ jobs:
|
||||
if: steps.arm64.outcome == 'failure'
|
||||
continue-on-error: true
|
||||
timeout-minutes: 25
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
|
||||
with:
|
||||
file: ./Dockerfile.shared-httpd
|
||||
platforms: linux/arm64
|
||||
@@ -1024,7 +1024,7 @@ jobs:
|
||||
PHPVER: "83"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
|
||||
# Base image pinned by DIGEST, looked up directly at Docker Hub (never via
|
||||
# the pkg-cache mirror), so the mirror can only serve content-addressed
|
||||
@@ -1066,14 +1066,14 @@ jobs:
|
||||
echo "mirror=${mirror}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
|
||||
|
||||
# BuildKit (docker-container driver) ignores dockerd's registry-mirrors,
|
||||
# so the mirror is configured on the builder; BuildKit itself still falls
|
||||
# back to Docker Hub if the mirror stops answering mid-run.
|
||||
- name: Set up Docker Buildx (Docker Hub via pkg-cache mirror)
|
||||
if: steps.pkgcache.outputs.mirror != ''
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
||||
with:
|
||||
buildkitd-config-inline: |
|
||||
[registry."docker.io"]
|
||||
@@ -1083,17 +1083,17 @@ jobs:
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
if: steps.pkgcache.outputs.mirror == ''
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
||||
|
||||
- name: Login to Gitea
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
|
||||
with:
|
||||
registry: repo.anhonesthost.net
|
||||
username: ${{ secrets.CI_USER }}
|
||||
password: ${{ secrets.CI_TOKEN }}
|
||||
|
||||
- name: Build and Push Shared OLS Image
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
|
||||
with:
|
||||
file: ./Dockerfile.shared-ols
|
||||
platforms: linux/amd64
|
||||
|
||||
@@ -98,7 +98,7 @@ jobs:
|
||||
|
||||
- name: Checkout
|
||||
if: steps.t.outputs.skip == '0'
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
|
||||
# sha256 of php-X.Y.Z.tar.xz from php.net's own releases JSON. The build
|
||||
# re-verifies it AND the OpenPGP signature; this step only refuses early
|
||||
@@ -135,17 +135,17 @@ jobs:
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
if: steps.t.outputs.skip == '0'
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
||||
|
||||
- name: Set up QEMU (arm64)
|
||||
if: steps.t.outputs.skip == '0' && steps.t.outputs.arm == 'true'
|
||||
uses: docker/setup-qemu-action@v3
|
||||
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
|
||||
with:
|
||||
platforms: arm64
|
||||
|
||||
- name: Login to Gitea
|
||||
if: steps.t.outputs.skip == '0'
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
|
||||
with:
|
||||
registry: repo.anhonesthost.net
|
||||
username: ${{ secrets.CI_USER }}
|
||||
@@ -155,7 +155,7 @@ jobs:
|
||||
- name: Build amd64 (push by digest)
|
||||
if: steps.t.outputs.skip == '0'
|
||||
id: amd64
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
|
||||
with:
|
||||
file: ${{ steps.t.outputs.dockerfile }}
|
||||
platforms: linux/amd64
|
||||
@@ -176,7 +176,7 @@ jobs:
|
||||
id: arm64
|
||||
continue-on-error: true
|
||||
timeout-minutes: 120
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
|
||||
with:
|
||||
file: ${{ steps.t.outputs.dockerfile }}
|
||||
platforms: linux/arm64
|
||||
|
||||
@@ -73,9 +73,14 @@ bflag=(); [ -n "$builder" ] && bflag=(--builder "$builder")
|
||||
# shellcheck disable=SC2086
|
||||
it() { $IMAGETOOLS "$1" "${bflag[@]}" "${@:2}"; }
|
||||
|
||||
# tag_digest <ref>: manifest (index) digest of a ref; empty on failure.
|
||||
# tag_digest <ref>: manifest (index) digest of a ref = sha256 of its raw manifest bytes; empty on
|
||||
# failure. (Not `--format {{.Manifest.Digest}}`: the CI runner's buildx 0.13.1 ignores it.)
|
||||
tag_digest() {
|
||||
it inspect "$1" --format '{{.Manifest.Digest}}' 2>>"${ATTACH_STDERR:-/dev/stderr}" | tail -n 1 | tr -d '[:space:]' || true
|
||||
local h
|
||||
h=$(it inspect --raw "$1" 2>/dev/null | sha256sum | cut -d' ' -f1) || return 0
|
||||
# sha256 of empty input means the inspect produced nothing
|
||||
[ "$h" = e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 ] && return 0
|
||||
echo "sha256:$h"
|
||||
}
|
||||
# arch_of <ref>: image config architecture; empty on failure.
|
||||
arch_of() {
|
||||
|
||||
@@ -37,7 +37,7 @@ if cmd == 'inspect':
|
||||
raw = '--raw' in rest
|
||||
ref = [a for a in rest if not a.startswith('--') and not a.startswith('{{')][0] if not raw else rest[rest.index('--raw') + 1]
|
||||
if raw:
|
||||
print(json.dumps(resolve(ref)[1]))
|
||||
sys.stdout.write(json.dumps(resolve(ref)[1], sort_keys=True))
|
||||
elif '{{.Manifest.Digest}}' in rest:
|
||||
print(resolve(ref)[0])
|
||||
elif '{{json .Image}}' in rest:
|
||||
|
||||
@@ -418,8 +418,11 @@ class AttachWorkflow(unittest.TestCase):
|
||||
self.assertNotIn('Build amd64', self.job)
|
||||
|
||||
def test_nothing_but_the_script_writes_a_tag(self):
|
||||
for bad in ('imagetools create', 'docker push', 'docker tag', '/cac:latest', '/cac-fpm:latest', 'ghcr.io', 'docker buildx build'):
|
||||
for bad in ('imagetools create', 'docker push', 'docker tag', '/cac:latest', '/cac-fpm:latest', 'ghcr.io'):
|
||||
self.assertNotIn(bad, self.job, bad)
|
||||
self.assertEqual(self.job.count('docker buildx build'), 1) # only the local PHP-version probe
|
||||
self.assertIn('type=local,dest=', self.job)
|
||||
self.assertNotIn('--push', self.job)
|
||||
self.assertEqual(self.job.count('scripts/attach-arm64-index.sh'), 2) # plan (read-only) + attach
|
||||
self.assertIn('--plan-only', step(self.job, 'Plan'))
|
||||
self.assertNotIn('--arm64', step(self.job, 'Plan'))
|
||||
|
||||
Reference in new issue
Block a user