-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (36 loc) · 1.05 KB
/
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
35
36
37
38
39
name: Test build
on: push
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
# Expose matched filters as job 'variants' output variable
image_variants: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
# https://github.com/marketplace/actions/paths-changes-filter#conditional-execution
id: filter
with:
# detect changes against last commit
base: ${{ github.ref }}
filters: |
Dockerfile: Dockerfile
Dockerfile-deb: Dockerfile-deb
build:
needs: detect-changes
name: Setup, Build
runs-on: ubuntu-latest
continue-on-error: true
strategy:
max-parallel: 6
# select a core set of images to build
matrix:
IMAGE_VARIANT: ${{ fromJSON(needs.detect-changes.outputs.image_variants) }}
steps:
- name: Checkout
uses: actions/checkout@v2
# Build the Docker image
- name: Build
run: |
docker build -f ${{ matrix.IMAGE_VARIANT }} .