Skip to content

Update GitHub Actions workflow to include detection of changes agains… #8

Update GitHub Actions workflow to include detection of changes agains…

Update GitHub Actions workflow to include detection of changes agains… #8

Workflow file for this run

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 }} .