Skip to content

Commit 8e2c01a

Browse files
committed
Publish via buildx multiplatform
1 parent e5c15b7 commit 8e2c01a

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Build the image multiplatform
3535
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 .
3636

37-
- name: Run tests
37+
- name: Build the image single platform and run tests
3838
run: ./tests.sh
3939

4040
- name: Scan the image

.github/workflows/publish.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,34 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v2
1515

16+
- name: Set up QEMU
17+
uses: docker/setup-qemu-action@v1
18+
19+
- name: Set up Docker Buildx
20+
id: buildx
21+
uses: docker/setup-buildx-action@v1
22+
23+
- name: Inspect builder
24+
run: |
25+
echo "Name: ${{ steps.buildx.outputs.name }}"
26+
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
27+
echo "Status: ${{ steps.buildx.outputs.status }}"
28+
echo "Flags: ${{ steps.buildx.outputs.flags }}"
29+
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
30+
1631
- name: Build the image
17-
run: docker build -t mendhak/test-image .
32+
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 .
33+
1834
- name: Get the version
1935
id: get_version
2036
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
37+
2138
- name: Log in to Docker Hub
2239
uses: docker/login-action@v1
2340
with:
2441
username: ${{ secrets.DOCKER_HUB_USERNAME }}
2542
password: ${{ secrets.DOCKER_HUB_TOKEN }}
43+
2644
- name: Push to Docker Hub
2745
uses: docker/build-push-action@v2
2846
with:

0 commit comments

Comments
 (0)