Skip to content

Commit 314ef4b

Browse files
committed
test
1 parent 4b91730 commit 314ef4b

File tree

2 files changed

+37
-13
lines changed

2 files changed

+37
-13
lines changed

.github/workflows/build_default.yaml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ jobs:
106106
echo "DOCKER_TAG=${DOCKER_TAG}" >> "${GITHUB_ENV}"
107107
#Copy dockerfiles
108108
mkdir -p "/tmp/DOCKERFILES" && cd "/tmp/DOCKERFILES"
109-
cp "${GITHUB_WORKSPACE}/main/Github/Runners/alpine.dockerfile" "/tmp/DOCKERFILES/alpine.dockerfile"
109+
#cp "${GITHUB_WORKSPACE}/main/Github/Runners/alpine.dockerfile" "/tmp/DOCKERFILES/alpine.dockerfile"
110+
cp -fv "${GITHUB_WORKSPACE}/main/Github/Runners/docker-bake.hcl" "/tmp/DOCKERFILES/docker-bake.hcl"
110111
#Download Rootfs
111112
ROOTFS_FILE="$(curl -qfsSL "https://dl-cdn.alpinelinux.org/alpine/edge/releases/loongarch64/latest-releases.yaml" | grep -oE 'alpine-[^[:space:]"'\'']+\.tar\.gz' | sed 's/[[:space:]]*$//' | sort -u | head -1 | tr -d '"'\''[:space:]')"
112113
for i in {1..3}; do
@@ -150,17 +151,9 @@ jobs:
150151
password: "${{ secrets.GITHUB_TOKEN }}"
151152
continue-on-error: true
152153

153-
- name: Docker Build and Push (Alpine)
154-
uses: docker/build-push-action@v6
154+
- name: Bake and push all targets
155+
uses: docker/bake-action@v4
155156
with:
156-
context: /tmp/DOCKERFILES/
157-
file: "/tmp/DOCKERFILES/alpine.dockerfile"
158-
platforms: "linux/amd64,linux/arm64,linux/loong64,linux/riscv64"
159-
tags: |
160-
pkgforge/alpine:edge
161-
pkgforge/alpine:edge-${{ env.DOCKER_TAG }}
162-
ghcr.io/pkgforge/devscripts/alpine:edge
163-
ghcr.io/pkgforge/devscripts/alpine:edge-${{ env.DOCKER_TAG }}
164-
outputs: type=registry,compression=zstd,compression-level=22
165-
continue-on-error: true
157+
files: /tmp/DOCKERFILES/docker-bake.hcl
158+
targets: default
166159
#------------------------------------------------------------------------------------#

Github/Runners/docker-bake.hcl

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
group "default" {
2+
targets = ["alpine", "alpine-loong64"]
3+
}
4+
5+
target "alpine" {
6+
context = "./"
7+
dockerfile = "alpine.dockerfile"
8+
target = "final"
9+
platforms = ["linux/amd64", "linux/arm64", "linux/riscv64"]
10+
tags = [
11+
"pkgforge/alpine:edge",
12+
"pkgforge/alpine:edge-${DOCKER_TAG}",
13+
"ghcr.io/pkgforge/devscripts/alpine:edge",
14+
"ghcr.io/pkgforge/devscripts/alpine:edge-${DOCKER_TAG}"
15+
]
16+
output = ["type=registry,compression=zstd,compression-level=22"]
17+
}
18+
19+
target "alpine-loong64" {
20+
context = "./"
21+
dockerfile = "alpine.dockerfile"
22+
target = "final-loong64"
23+
platforms = ["linux/loong64"]
24+
tags = [
25+
"pkgforge/alpine:edge-loong64",
26+
"pkgforge/alpine:edge-${DOCKER_TAG}-loong64",
27+
"ghcr.io/pkgforge/devscripts/alpine:edge-loong64",
28+
"ghcr.io/pkgforge/devscripts/alpine:edge-${DOCKER_TAG}-loong64"
29+
]
30+
output = ["type=registry,compression=zstd,compression-level=22"]
31+
}

0 commit comments

Comments
 (0)