Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use REPO_SLUG as possible #171

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ jobs:
load: true
set: |
*.cache-from=type=gha,scope=${{ env.CACHE_GHA_SCOPE }}-${{ matrix.target }}
mainline.tags=tonistiigi/binfmt:test
mainline.tags=${{ env.REPO_SLUG }}:test
-
name: Test mainline
if: matrix.target == 'mainline'
run: |
docker run --rm --privileged tonistiigi/binfmt:test --uninstall amd64,arm64,arm,ppc64le,s390x,riscv64,loongarch64
docker run --rm --privileged tonistiigi/binfmt:test --install all
docker run --rm --privileged ${{ env.REPO_SLUG }}:test --uninstall amd64,arm64,arm,ppc64le,s390x,riscv64,loongarch64
docker run --rm --privileged ${{ env.REPO_SLUG }}:test --install all
docker run --rm arm64v8/alpine uname -a
docker run --rm arm32v7/alpine uname -a
docker run --rm ppc64le/alpine uname -a
Expand Down Expand Up @@ -176,12 +176,12 @@ jobs:
load: true
set: |
*.cache-from=type=gha,scope=${{ env.CACHE_GHA_SCOPE }}-${{ matrix.target }}
*.tags=tonistiigi/binfmt:test
*.tags=${{ env.REPO_SLUG }}:test
-
name: Set up QEMU
run: |
docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-*
docker run --rm --privileged tonistiigi/binfmt:test --install all
docker run --privileged --rm ${{ env.REPO_SLUG }} --uninstall qemu-*
docker run --rm --privileged ${{ env.REPO_SLUG }}:test --install all
-
name: Test
working-directory: test/dockerfiles/${{ matrix.dockerfile }}
Expand Down
15 changes: 9 additions & 6 deletions hack/install-and-test
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
. $(dirname $0)/util
set -eu

TAG=${TAG:-test} buildxCmd bake $setFlags --load mainline
REPO_SLUG=${REPO_SLUG:-tonistiigi/binfmt}
TAG=${TAG:-test}

buildxCmd bake $setFlags --load mainline

set -o pipefail -x
docker run --rm --privileged tonistiigi/binfmt:${TAG:-test} --uninstall qemu-*
status=$(docker run --rm --privileged tonistiigi/binfmt:${TAG:-test} --install all)
docker run --rm --privileged ${REPO_SLUG}:${TAG} --uninstall qemu-*
status=$(docker run --rm --privileged ${REPO_SLUG}:${TAG} --install all)

echo $status | jq .supported | grep linux/arm64
echo $status | jq .supported | grep linux/amd64
Expand All @@ -29,7 +32,7 @@ docker run --rm tonistiigi/debian:riscv uname -a

if [ "$(uname -m)" != "x86_64" ]; then exit 0; fi

status=$(docker run --rm --privileged tonistiigi/binfmt:${TAG:-test} --uninstall aarch64,riscv64)
status=$(docker run --rm --privileged ${REPO_SLUG}:${TAG} --uninstall aarch64,riscv64)

if echo $status | jq .supported | grep linux/arm64; then exit 1; fi
if echo $status | jq .supported | grep linux/riscv64; then exit 1; fi
Expand All @@ -43,7 +46,7 @@ if echo $status | jq .emulators | grep riscv64; then exit 1; fi

if docker run --rm arm64v8/alpine uname -a 2>/dev/null; then exit 1; fi

docker run --rm --privileged tonistiigi/binfmt:${TAG:-test} --install arm64
docker run --rm --privileged ${REPO_SLUG}:${TAG} --install arm64
docker run --rm arm64v8/alpine uname -a

docker run --rm --privileged tonistiigi/binfmt:${TAG:-test} --install riscv64
docker run --rm --privileged ${REPO_SLUG}:${TAG} --install riscv64