Skip to content

Commit 4a1013e

Browse files
committed
Fix workflow definition
1 parent a8407cf commit 4a1013e

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on: [push, pull_request]
77

88
jobs:
99
build:
10-
name: Lint the codebase
10+
name: Lint the codebase, build and test the image
1111
runs-on: ubuntu-20.04
1212
steps:
1313
- uses: actions/[email protected]
@@ -22,24 +22,25 @@ jobs:
2222
uses: docker/setup-buildx-action@v1
2323
- name: Set up QEMU
2424
uses: docker/setup-qemu-action@v1
25-
- name: Build the container image for x86_64 only
25+
- name: Build the container image for x86_64 to get early feedback
2626
uses: docker/build-push-action@v2
2727
with:
2828
context: .
2929
file: ./Dockerfile
3030
platforms: linux/amd64
3131
push: false
3232
tags: ${{ env.CONTAINER_IMAGE_TAG }}
33-
- name: Test the container image
34-
shell: bash
35-
run: docker run ${{ env.CONTAINER_IMAGE_TAG }}
3633
deploy:
3734
environment: Docker Hub
3835
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
3936
name: Deploy the container image
4037
needs: build
4138
runs-on: ubuntu-20.04
4239
steps:
40+
- name: Setup Docker Buildx
41+
uses: docker/setup-buildx-action@v1
42+
- name: Set up QEMU
43+
uses: docker/setup-qemu-action@v1
4344
- name: Login to Docker Hub
4445
uses: docker/login-action@v1
4546
with:
@@ -53,3 +54,6 @@ jobs:
5354
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
5455
push: true
5556
tags: ${{ env.CONTAINER_IMAGE_TAG }}
57+
- name: Test the container image
58+
shell: bash
59+
run: docker run ${{ env.CONTAINER_IMAGE_TAG }}

0 commit comments

Comments
 (0)