generated from jacobtomlinson/python-container-action
-
Notifications
You must be signed in to change notification settings - Fork 6
31 lines (29 loc) · 986 Bytes
/
test-docker-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Test Docker Image Build
on:
push:
pull_request:
jobs:
test-docker-image:
name: Test Docker Image
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3.3.0
- # Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# The build runs some tests on the built binary to make sure it works as part of its build
- name: Test Build
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
push: false
platforms: linux/amd64,linux/arm64
# https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md#registry-cache
cache-from: type=gha
cache-to: type=gha,mode=max