Skip to content

Commit 73fb9a3

Browse files
committed
build and output images
1 parent 61aad5a commit 73fb9a3

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.github/workflows/build_and_push_images.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,10 @@ jobs:
2626
- name: Build and Push Commit Image
2727
if: github.event_name == 'push'
2828
run: sh push-images.sh
29+
30+
- name: Upload Build Artifacts
31+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
32+
with:
33+
name: multiarch-docker-images
34+
path: |
35+
*.tar.gz

push-images.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,16 @@ do
2828
fi
2929
fi
3030
echo "building $image => `cat nametag`..."
31-
docker buildx build --push --platform linux/amd64,linux/arm64 -t acmestack/`cat nametag` .
31+
docker buildx build \
32+
--push \
33+
--platform linux/amd64,linux/arm64 \
34+
--output type=tar,dest=/tmp/${nametag}.tar \
35+
-t acmestack/`cat nametag` \ .
36+
# gzip and move
37+
gzip /tmp/${nametag}.tar
38+
mv /tmp/${nametag}.tar.gz "../../${image}_amd64_arm64_${current_date}.tar.gz"
39+
40+
echo "✅ Saved as ${image}_amd64_arm64_${current_date}.tar.gz"
3241
echo "done."
3342
cd ..
3443
fi

0 commit comments

Comments
 (0)