From 72085a217679fe5fa228712083efaf770e7fa6b1 Mon Sep 17 00:00:00 2001 From: supahgreg Date: Sat, 11 Oct 2025 03:54:36 +0000 Subject: Add a 'Docker Code Quality' GitHub workflow. Initially just checks that the 'Dockerfile' files are valid. --- .github/workflows/docker-code-quality.yml | 39 +++++++++++++++++++++++++++++++ .github/workflows/publish.yml | 4 ++++ 2 files changed, 43 insertions(+) create mode 100644 .github/workflows/docker-code-quality.yml diff --git a/.github/workflows/docker-code-quality.yml b/.github/workflows/docker-code-quality.yml new file mode 100644 index 000000000..e96baf281 --- /dev/null +++ b/.github/workflows/docker-code-quality.yml @@ -0,0 +1,39 @@ +name: Docker Code Quality + +on: + pull_request: + paths: + - '.docker/**' + # Allow manual triggering + workflow_dispatch: + # Allow other workflows (e.g. Publish) to invoke this one. + workflow_call: + + +permissions: + contents: read + + +jobs: + check: + name: Check Docker image ${{ matrix.image.name }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + image: + - name: app + dockerfile: ./.docker/app/Dockerfile + - name: web-nginx + dockerfile: ./.docker/web-nginx/Dockerfile + + steps: + - name: Check out code + uses: actions/checkout@v5 + + - name: Validate configuration + uses: docker/build-push-action@v6 + with: + context: . + file: ${{ matrix.image.dockerfile }} + call: check diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1ef46b631..1a5e19e22 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,12 +24,16 @@ permissions: jobs: + test-docker: + uses: ./.github/workflows/docker-code-quality.yml + test-php: uses: ./.github/workflows/php-code-quality.yml publish: name: Publish Docker image ${{ matrix.image.name }} needs: + - test-docker - test-php runs-on: ubuntu-latest permissions: -- cgit v1.2.3-54-g00ecf