Skip to content

Commit 2b211da

Browse files
committed
reintroduces the arch exception from main
1 parent a240075 commit 2b211da

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/images.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ jobs:
348348
tags: |
349349
ghcr.io/yolean/headless-chrome:latest
350350
ghcr.io/yolean/headless-chrome:${{ github.sha }}
351-
platforms: linux/amd64,linux/arm64/v8
351+
platforms: linux/amd64
352352
push: true
353353
cache-from: |
354354
type=gha,scope=buildx-headless-chrome-latest

test.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ runtime-quarkus-deno
6060
runtime-deno
6161
"
6262

63+
# Images that are only buildable on amd64
64+
SINGLE_ARCH_AMD64="headless-chrome"
65+
6366
BEGIN=" ### build steps below are generated ###"
6467
CURRENT=.github/workflows/images.yaml
6568
ACTIONS=$(mktemp)
@@ -77,6 +80,15 @@ function base_action {
7780
# Get dependencies for build-contexts
7881
local DEPENDENCIES="$((grep -e 'FROM --platform=$TARGETPLATFORM yolean/' -e 'FROM --platform=$BUILDPLATFORM yolean/' $CONTEXT/Dockerfile || true) | cut -d' ' -f3)"
7982
83+
# Determine platforms (override if in SINGLE_ARCH_AMD64)
84+
local PLATFORMS="linux/amd64,linux/arm64/v8"
85+
for ONLY_AMD64 in $SINGLE_ARCH_AMD64; do
86+
if [ "$NAME" = "$ONLY_AMD64" ]; then
87+
PLATFORMS="linux/amd64"
88+
break
89+
fi
90+
done
91+
8092
cat <<EOF
8193
-
8294
name: Build and push $NAME $TAG
@@ -90,7 +102,7 @@ function base_action {
90102
tags: |
91103
ghcr.io/yolean/$NAME:$TAG
92104
ghcr.io/yolean/$NAME:\${{ github.sha }}$TAGSUFFIX
93-
platforms: linux/amd64,linux/arm64/v8
105+
platforms: $PLATFORMS
94106
push: true
95107
cache-from: |
96108
type=gha,scope=$CACHE_KEY_PREFIX

0 commit comments

Comments
 (0)