Skip to content

Commit

Permalink
test with Github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Wang committed Oct 3, 2024
1 parent 0cba89d commit a3980ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max

- run: bash ./test.sh ${{ env.IMAGE_NAME }}/${{ steps.meta.outputs.tags }}
- run: bash ${{ github.workspace }}/test.sh ${{ env.IMAGE_NAME }}/${{ steps.meta.outputs.tags }}
name: check the platform in multi-arch images

- name: set tags
Expand Down
10 changes: 10 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

tag=${1:-latest}
image="alpine/used-for-docker-scout-score-check-only"

for platform in linux/amd64 linux/arm/v7 linux/arm64/v8 linux/arm/v6 linux/ppc64le linux/s390x linux/386
do
echo "Platfom is $platform"
docker run --rm -ti --platform "${platform}" --entrypoint=sh ${image}:${tag} -c "uname -m"
done

0 comments on commit a3980ef

Please sign in to comment.