Skip to content

Commit e5c15b7

Browse files
committed
Build multiplatform but test single platform
1 parent 34baf7e commit e5c15b7

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@ jobs:
3131
echo "Flags: ${{ steps.buildx.outputs.flags }}"
3232
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
3333
34-
- name: Build and test the image
35-
run: DOCKER_PLATFORM=linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x ./tests.sh
34+
- name: Build the image multiplatform
35+
run: docker buildx build --output "type=image,push=false" --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x --tag mendhak/http-https-echo:latest --file ./Dockerfile .
36+
37+
- name: Run tests
38+
run: ./tests.sh
3639

3740
- name: Scan the image
3841
id: scan

tests.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@ if ! [ -x "$(command -v jq)" ]; then
2626
sudo apt -y install jq
2727
fi
2828

29-
PLATFORM=${DOCKER_PLATFORM:-linux/amd64}
3029
message " Build image "
31-
# Set output type=docker so it goes into local images
32-
docker buildx build --output "type=docker,push=false" --platform $PLATFORM --tag mendhak/http-https-echo:latest --file ./Dockerfile .
30+
docker build -t mendhak/http-https-echo:latest .
3331

3432
mkdir -p testarea
3533
pushd testarea

0 commit comments

Comments
 (0)