-
Notifications
You must be signed in to change notification settings - Fork 50
34 lines (34 loc) · 1000 Bytes
/
image-build.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
32
33
34
# Attempt to build (but not push) the Docker image on Pull Requests
name: Image build
on:
pull_request:
branches:
- main
- release-*
paths-ignore:
- "**.md"
- "docs/**"
- "static/**"
- "LICENSE"
permissions:
contents: read
jobs:
docker-image:
name: Check docker image build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3
- name: Test build on x86
id: docker_build
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: false # Only attempt to build, to verify the Dockerfile is working
load: true
cache-from: type=gha
cache-to: type=gha,mode=max