From df611ff8a1908a73ce3926793a04963ab542fbe9 Mon Sep 17 00:00:00 2001 From: Mattias Michaux Date: Tue, 16 Apr 2024 20:53:36 +0200 Subject: [PATCH] Add MVP basic test step to be able to check if PR's actually allow to build the image --- .../workflows/{ci.yml => build_publish.yml} | 0 .github/workflows/test.yml | 27 +++++++++++++++++++ 2 files changed, 27 insertions(+) rename .github/workflows/{ci.yml => build_publish.yml} (100%) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/build_publish.yml similarity index 100% rename from .github/workflows/ci.yml rename to .github/workflows/build_publish.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..201f468 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,27 @@ +name: Test build Docker image + +on: + pull_request: + schedule: + # Run every day at 10:45 AM UTC to discover potential issues with dependencies like PHP updates etc. + - cron: '45 10 * * *' + +jobs: + build-image: + runs-on: ubuntu-latest + strategy: + matrix: + image_type: [apache, fpm] + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + file: ${{ matrix.image_type }}/Dockerfile + context: . + tags: ${{ matrix.image_type }}-test