File tree Expand file tree Collapse file tree 6 files changed +35
-20
lines changed
Expand file tree Collapse file tree 6 files changed +35
-20
lines changed Original file line number Diff line number Diff line change 3030 - name : Install jq
3131 run : sudo apt-get install -y jq
3232
33+ - name : Set up QEMU
34+ uses : docker/setup-qemu-action@v3
35+ with :
36+ platforms : arm64
37+
38+ - name : Set up Docker Buildx
39+ uses : docker/setup-buildx-action@v3
40+ with :
41+ driver : docker-container
42+
3343 - name : Run build script
3444 run : ./build.sh
3545 env :
Original file line number Diff line number Diff line change 11#! /bin/bash
22source common.sh
3+ platforms=" ${PLATFORMS:- linux/ amd64,linux/ arm64} "
34docker-tags alpine |
45while read tag; do
56 dockerfile=$( mktemp)
@@ -9,9 +10,9 @@ RUN sed -i \
910 -e 's/dl-.*.alpinelinux.org/mirrors.ustc.edu.cn/g' \
1011 /etc/apk/repositories
1112EOF
12- docker build -f $dockerfile -t ustclug/alpine: $tag .
13- docker tag ustclug/alpine: $tag ghcr.io/ ustclug/alpine:$tag
14- docker push ustclug/alpine:$tag
15- docker push ghcr.io/ustclug/alpine: $tag
13+ docker buildx build --platform " $platforms " -f $dockerfile \
14+ -t ustclug/alpine:$tag \
15+ -t ghcr.io/ ustclug/alpine:$tag \
16+ -- push .
1617 rm $dockerfile
1718done
Original file line number Diff line number Diff line change 11#! /bin/bash
22source common.sh
3+ platforms=" ${PLATFORMS:- linux/ amd64,linux/ arm64} "
34docker-tags debian |
45while read tag; do
56 unset backports_list
@@ -17,9 +18,9 @@ RUN sed -i \
1718 -e 's/security.debian.org/mirrors.ustc.edu.cn/g' \
1819 /etc/apt/sources.list.d/debian.sources $backports_list
1920EOF
20- docker build -f $dockerfile -t ustclug/debian: $tag .
21- docker tag ustclug/debian: $tag ghcr.io/ ustclug/debian:$tag
22- docker push ustclug/debian:$tag
23- docker push ghcr.io/ustclug/debian: $tag
21+ docker buildx build --platform " $platforms " -f $dockerfile \
22+ -t ustclug/debian:$tag \
23+ -t ghcr.io/ ustclug/debian:$tag \
24+ -- push .
2425 rm $dockerfile
2526done
Original file line number Diff line number Diff line change 11#! /bin/bash
22source common.sh
3+ platforms=" ${PLATFORMS:- linux/ amd64,linux/ arm64} "
34docker-tags fedora |
45while read tag; do
56 dockerfile=$( mktemp)
@@ -11,9 +12,9 @@ FROM fedora:$tag
1112RUN $sedcommand /etc/yum.repos.d/fedora-modular.repo /etc/yum.repos.d/fedora-updates-modular.repo || true \
1213 && $sedcommand /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora-updates.repo
1314EOF
14- docker build -f $dockerfile -t ustclug/fedora: $tag .
15- docker tag ustclug/fedora: $tag ghcr.io/ ustclug/fedora:$tag
16- docker push ustclug/fedora:$tag
17- docker push ghcr.io/ustclug/fedora: $tag
15+ docker buildx build --platform " $platforms " -f $dockerfile \
16+ -t ustclug/fedora:$tag \
17+ -t ghcr.io/ ustclug/fedora:$tag \
18+ -- push .
1819 rm $dockerfile
1920done
Original file line number Diff line number Diff line change 11#! /bin/bash
22source common.sh
3+ platforms=" ${PLATFORMS:- linux/ amd64,linux/ arm64} "
34docker-tags rockylinux |
45while read tag; do
56 dockerfile=$( mktemp)
@@ -16,9 +17,9 @@ RUN sed -i \
1617 -e 's|dl.rockylinux.org/\$ contentdir|mirrors.ustc.edu.cn/rocky|g' \
1718 /etc/yum.repos.d/rocky*.repo
1819EOF
19- docker build -f $dockerfile -t ustclug/rocky: $tag .
20- docker tag ustclug/rocky: $tag ghcr.io/ ustclug/rocky:$tag
21- docker push ustclug/rocky:$tag
22- docker push ghcr.io/ustclug/rocky: $tag
20+ docker buildx build --platform " $platforms " -f $dockerfile \
21+ -t ustclug/rocky:$tag \
22+ -t ghcr.io/ ustclug/rocky:$tag \
23+ -- push .
2324 rm $dockerfile
2425done
Original file line number Diff line number Diff line change 11#! /bin/bash
22source common.sh
3+ platforms=" ${PLATFORMS:- linux/ amd64,linux/ arm64} "
34docker-tags ubuntu |
45while read tag; do
56 echo $tag | grep -q ' -' && continue
@@ -15,9 +16,9 @@ RUN sed -i \
1516 -e 's/security.ubuntu.com/mirrors.ustc.edu.cn/g' \
1617 /etc/apt/sources.list.d/ubuntu.sources || true
1718EOF
18- docker build -f $dockerfile -t ustclug/ubuntu: $tag .
19- docker tag ustclug/ubuntu: $tag ghcr.io/ ustclug/ubuntu:$tag
20- docker push ustclug/ubuntu:$tag
21- docker push ghcr.io/ustclug/ubuntu: $tag
19+ docker buildx build --platform " $platforms " -f $dockerfile \
20+ -t ustclug/ubuntu:$tag \
21+ -t ghcr.io/ ustclug/ubuntu:$tag \
22+ -- push .
2223 rm $dockerfile
2324done
You can’t perform that action at this time.
0 commit comments