Update Dockerfile #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build docker | |
on: | |
push: | |
paths: | |
- "scripts/dockers/**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
database: ["sqlite", "mariadb", "mysql", "postgresql"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Check file existence" | |
id: check_files | |
uses: andstor/file-existence-action@v2 | |
with: | |
files: "scripts/dockers/${{matrix.database}}/Dockerfile" | |
- name: Get changed files in the docs folder | |
id: changed-files-specific | |
uses: tj-actions/changed-files@v34 | |
with: | |
files: "scripts/dockers/${{matrix.database}}/**" | |
- name: Build the Docker image for each database | |
if: steps.check_files.outputs.files_exists == 'true' && steps.changed-files-specific.outputs.any_changed == 'true' | |
run: docker build . --file Dockerfile | |
working-directory: "scripts/dockers/${{matrix.database}}" |