From 359fff3ed46f4f5eeafc5ae6e8a774beb0919de1 Mon Sep 17 00:00:00 2001 From: Coen Jacobs Date: Sun, 8 Sep 2024 16:39:26 +0200 Subject: [PATCH] Explicit Docker build step before other jobs including caching --- .github/workflows/main.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6ad948c5..e547ed18 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,21 @@ on: - master jobs: + docker_build: + runs-on: ubuntu-latest + steps: + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v2 + - name: Build Docker image + id: build-and-push + uses: docker/build-push-action@v4 + with: + context: "{{defaultContext}}" + push: false + cache-from: type=gha + cache-to: type=gha,mode=max linting: + needs: docker_build runs-on: ubuntu-latest name: Linting steps: @@ -17,6 +31,7 @@ jobs: - name: Run linting run: docker compose run --rm actions-tester composer test:lint testing: + needs: docker_build runs-on: ubuntu-latest name: Testing steps: @@ -24,6 +39,7 @@ jobs: - name: Run testing run: docker compose run --rm actions-tester composer test:phpunit analysis: + needs: docker_build runs-on: ubuntu-latest name: Analysis steps: