For reproducibility, each top-level directory contains a Dockerfile and associated files to build a Docker image. The GitHub Actions workflow automatically builds and pushes these images to GitHub Container Registry (GHCR) under the PacificCommunity
organisation.
The pushed images are available at:
https://github.com/orgs/PacificCommunity/packages
This repository includes a GitHub Actions workflow that:
- Detects changed top-level directories (e.g.,
skj-2025/
,yft-2025/
). - Builds Docker images for each changed directory.
- Pushes them to GitHub Container Registry (GHCR) under the
pacificcommunity
organisation. - Either uses a user-specified version (provided via
workflow_dispatch
) or automatically increments the minor version if previous tags exist.
-
Auto-incrementing version:
- Scans GHCR for the highest existing tag (e.g.,
v1.4
or1.4
) and increments to1.5
. - Defaults to
1.0
if no valid version is found or the package does not exist.
- Scans GHCR for the highest existing tag (e.g.,
-
User-specified version:
- If you manually dispatch the workflow and enter a version (e.g.,
2.3
), that overrides auto-increment.
- If you manually dispatch the workflow and enter a version (e.g.,
-
Top-level directory detection:
- Each changed directory is treated as a separate container image.
- Create a new folder at the top level of this repository, for example
tuna-2025/
. - Put a Dockerfile inside that folder.
- Commit and push your changes (this will trigger the GitHub Actions workflow).
- The GitHub Actions workflow will detect the new directory, build a new Docker image, and push it to GHCR.
- Make the package public (if non-sensitive and intended for public use) so that others can access it without authentication by going to https://github.com/orgs/PacificCommunity/packages and clicking on the package name.
- Click on the “Settings” tab and change the visibility to “Public”.
- Modify the Dockerfile in one of the existing folders (e.g.
skj-2025/Dockerfile
). - Commit and push your changes (this will trigger the GitHub Actions workflow).
- The workflow detects changes in that directory’s Dockerfile and automatically rebuilds and pushes an updated image to GHCR.
-
Workflow trigger:
Whenever you push changes (especially Dockerfile changes), GitHub Actions automatically runs the build-and-push workflow. If anything goes wrong in the build or push process, the workflow will fail, and you can check the logs in the “Actions” tab for details. -
Failing workflow:
If the Docker build fails, version detection fails, or pushing to GHCR fails, you will see a red “X” in the GitHub Actions run. View the logs to diagnose and fix the issue before retrying.