File tree Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -36,13 +36,20 @@ jobs:
3636 username : ${{ secrets.QUAY_USER }}
3737 password : ${{ secrets.QUAY_TOKEN }}
3838
39+ - name : Set up QEMU
40+ uses : docker/setup-qemu-action@v2
41+
42+ - name : Set up Docker Buildx
43+ uses : docker/setup-buildx-action@v2
44+
3945 - name : Build and push
4046 id : docker_build
4147 uses : docker/build-push-action@v2
4248 env :
4349 TAG : ${{ steps.version-from-branch.outputs.version }}${{ env.TAG_SUFFIX }}
4450 with :
45- build-args : channel=stable version=current
51+ platforms : linux/amd64, linux/s390x
52+ build-args : channel=stable
4653 push : true
4754 file : Dockerfile
4855 tags : ${{ env.REGISTRY }}/${{ env.REPO_NAME }}:${{ github.event.inputs.tag || env.TAG }}
Original file line number Diff line number Diff line change 1- FROM centos:8 as base
1+ FROM quay.io/ centos/centos:stream9 as base
22ARG channel="stable"
33ARG location
44
55RUN [ -z "${channel}" ] && echo "ARG channel is required" && exit 1 || true
66
77RUN yum -y install jq
8- RUN curl https://builds.coreos.fedoraproject.org/streams/${channel}.json -o stable.json && \
9- cat stable.json | jq '.architectures.x86_64.artifacts.qemu.release' | tr -d '"'
8+ RUN ARCH=$(uname -m) ; echo $ARCH \
9+ ; curl https://builds.coreos.fedoraproject.org/streams/${channel}.json -o stable.json && \
10+ cat stable.json | jq -r --arg arch "$ARCH" '.architectures[$arch].artifacts.qemu.release'
1011
1112
1213FROM base AS executor-img
1314
1415RUN if [[ -z "$arg" ]] ; then \
15- echo "Downloading" $(cat stable.json | jq '.architectures.x86_64.artifacts.qemu.formats."qcow2.xz".disk.location' | tr -d '"' ) && \
16- curl -s -o coreos_production_qemu_image.qcow2.xz $(cat stable.json | jq '.architectures.x86_64.artifacts.qemu.formats."qcow2.xz".disk.location' | tr -d '"' ) && unxz coreos_production_qemu_image.qcow2.xz ; \
16+ ARCH=$(uname -m) ; echo $ARCH ; \
17+ echo "Downloading" $(cat stable.json | jq -r --arg arch "$ARCH" '.architectures[$arch].artifacts.qemu.formats."qcow2.xz".disk.location' ) && \
18+ curl -s -o coreos_production_qemu_image.qcow2.xz $(cat stable.json | jq -r --arg arch "$ARCH" '.architectures[$arch].artifacts.qemu.formats."qcow2.xz".disk.location' ) && \
19+ unxz coreos_production_qemu_image.qcow2.xz ; \
1720 else \
1821 echo "Downloading" ${location} && \
1922 curl -s -o coreos_production_qemu_image.qcow2.xz ${location} && unxz coreos_production_qemu_image.qcow2.xz \
Original file line number Diff line number Diff line change @@ -4,12 +4,12 @@ set -o nounset
44TAG=${TAG:- " stable" }
55IMAGE=${IMAGE:- " quay.io/quay/quay-builder-qemu-fedoracoreos" }
66CLOUD_IMAGE=${CLOUD_IMAGE:- " " }
7+ ARCH=$( uname -m)
78
89if [ -z " $CLOUD_IMAGE " ]; then
910 CHANNEL=${CHANNEL:- " stable" }
1011 CHANNEL_MANIFEST_JSON=` curl https://builds.coreos.fedoraproject.org/streams/${CHANNEL} .json`
11- LOCATION=` echo $CHANNEL_MANIFEST_JSON | jq ' .architectures.x86_64.artifacts.qemu.formats."qcow2.xz".disk.location' | tr -d ' "' `
12- VERSION=` echo $CHANNEL_MANIFEST_JSON | jq ' .architectures.x86_64.artifacts.qemu.release' | tr -d ' "' `
12+ LOCATION=` echo $CHANNEL_MANIFEST_JSON | jq -r --arg arch " $ARCH " ' .architectures[$arch].artifacts.qemu.formats."qcow2.xz".disk.location' `
1313
1414 time docker build --build-arg=channel=$CHANNEL --build-arg --build-arg -t $IMAGE :$TAG .
1515else
You can’t perform that action at this time.
0 commit comments