Skip to content

Consolidate push-to-main build-and-push workflows into a single matrix workflow #121

@Soulike

Description

@Soulike

Summary

The 7 individual *-docker-image-build-and-push.yml workflows that trigger on push to main should be consolidated into a single matrix workflow, following the same pattern already used in apps-ci.yml.

Current State

There are 7 separate workflow files that all follow the same structure:

  • blog-docker-image-build-and-push.yml
  • admin-docker-image-build-and-push.yml
  • game-2048-docker-image-build-and-push.yml
  • auth-server-docker-image-build-and-push.yml
  • admin-legacy-server-docker-image-build-and-push.yml
  • blog-legacy-server-docker-image-build-and-push.yml
  • database-legacy-server-docker-image-build-and-push.yml

Each triggers on push to main with overlapping path filters (e.g., modules/**, libraries/**). A single commit touching modules/ triggers all 7 workflows independently, each pulling base images from Docker Hub separately.

Proposed Change

Consolidate into a single workflow (e.g., apps-build-and-push.yml) using dorny/paths-filter + a dynamic matrix strategy, exactly like apps-ci.yml already does. This:

  1. Reduces workflow file duplication.
  2. Provides a single place to add shared setup steps (e.g., pre-pulling base images once).
  3. Makes it easier to add new apps in the future.

Note: The nginx-docker-image-build-and-push.yml can remain separate since it uses a different Dockerfile and has distinct path filters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions