Skip to content

Merge pull request #574 from nextcloud/updateMainDesktopClientDockerI… #253

Merge pull request #574 from nextcloud/updateMainDesktopClientDockerI…

Merge pull request #574 from nextcloud/updateMainDesktopClientDockerI… #253

Workflow file for this run

name: Docker Image Build
on:
push:
branches: [ master ]
paths:
- '*/Dockerfile'
pull_request:
branches: [ master ]
paths:
- '*/Dockerfile'
jobs:
files:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.dockerfile.outputs.matrix }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get changed files
id: files
uses: jitterbit/get-changed-files@v1
with:
format: json
- name: Extract Dockerfile files
id: dockerfile
run: |
FILES=$( echo '${{ steps.files.outputs.added_modified }}' | jq -c 'map(select(. | endswith("Dockerfile")))' )
echo "::set-output name=matrix::$FILES"
build:
runs-on: ubuntu-latest
needs: files
strategy:
fail-fast: false
matrix:
dockerfile: ${{ fromJSON(needs.files.outputs.matrix) }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Build Docker image ${{ matrix.dockerfile }}
run: |
cd "$(dirname ${{ matrix.dockerfile }})"
docker build . --file Dockerfile