diff options
| author | supahgreg <supahgreg@users.noreply.github.com> | 2025-10-11 03:54:36 +0000 |
|---|---|---|
| committer | supahgreg <supahgreg@users.noreply.github.com> | 2025-10-11 03:54:36 +0000 |
| commit | 72085a217679fe5fa228712083efaf770e7fa6b1 (patch) | |
| tree | 57897929fd144095a440e49180b2dc8d04d2cf01 | |
| parent | 0813f468a6fb6b5610707ee986454b741ed4a1ea (diff) | |
Add a 'Docker Code Quality' GitHub workflow.
Initially just checks that the 'Dockerfile' files are valid.
| -rw-r--r-- | .github/workflows/docker-code-quality.yml | 39 | ||||
| -rw-r--r-- | .github/workflows/publish.yml | 4 |
2 files changed, 43 insertions, 0 deletions
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: |