Skip to content

Commit 4b91730

Browse files
committed
test
1 parent a1063b7 commit 4b91730

File tree

2 files changed

+13
-21
lines changed

2 files changed

+13
-21
lines changed

.github/workflows/build_default.yaml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -150,28 +150,12 @@ jobs:
150150
password: "${{ secrets.GITHUB_TOKEN }}"
151151
continue-on-error: true
152152

153-
- name: Docker Build and Push (alpine - multi-platform)
153+
- name: Docker Build and Push (Alpine)
154154
uses: docker/build-push-action@v6
155155
with:
156156
context: /tmp/DOCKERFILES/
157157
file: "/tmp/DOCKERFILES/alpine.dockerfile"
158-
platforms: "linux/amd64,linux/arm64,linux/riscv64"
159-
target: final
160-
tags: |
161-
pkgforge/alpine:edge
162-
pkgforge/alpine:edge-${{ env.DOCKER_TAG }}
163-
ghcr.io/pkgforge/devscripts/alpine:edge
164-
ghcr.io/pkgforge/devscripts/alpine:edge-${{ env.DOCKER_TAG }}
165-
outputs: type=registry,compression=zstd,compression-level=22
166-
continue-on-error: true
167-
168-
- name: Docker Build and Push (alpine - loong64)
169-
uses: docker/build-push-action@v6
170-
with:
171-
context: /tmp/DOCKERFILES/
172-
file: "/tmp/DOCKERFILES/alpine.dockerfile"
173-
platforms: "linux/loong64"
174-
target: final-loong64
158+
platforms: "linux/amd64,linux/arm64,linux/loong64,linux/riscv64"
175159
tags: |
176160
pkgforge/alpine:edge
177161
pkgforge/alpine:edge-${{ env.DOCKER_TAG }}

Github/Runners/alpine.dockerfile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
# syntax=docker/dockerfile:1
22
#------------------------------------------------------------------------------------#
33

4+
ARG TARGETARCH
5+
46
# Default stage for most architectures
5-
FROM alpine:edge AS final
7+
FROM alpine:edge AS base-standard
68
RUN apk add --no-cache ca-certificates tzdata
79
CMD ["/bin/sh"]
810

911
# Special stage for loong64
10-
FROM scratch AS final-loong64
12+
FROM scratch AS base-loong64
1113
ADD alpine-minirootfs-loongarch64.tar.gz /
1214
RUN apk add --no-cache ca-certificates tzdata
13-
CMD ["/bin/sh"]
15+
CMD ["/bin/sh"]
16+
17+
# Final stage with conditional logic
18+
FROM scratch AS final
19+
COPY --from=base-${TARGETARCH:-standard} / /
20+
# For loong64, this will copy from base-loong64
21+
# For others, this will copy from base-standard

0 commit comments

Comments
 (0)