Repository navigation
chore(ci): publish the image to ghcr.io, and drop the unused action wrapper [FTTECH-15150] - #11
Conversation
…rapper The PHP-CS-Fixer check of mobsuccess fails with "toomanyrequests: Data limit exceeded": its 34 MB image is pulled anonymously from ECR Public, which caps those pulls on the IPs GitHub runners share. The image was also pushed by hand, from no workflow. docker.yml builds the image on a pull request that touches it, and publishes it to ghcr.io on master when the Dockerfile or entrypoint.sh change, tagged with the PHP-CS-Fixer version (v3.13.0) so a workflow keeps the rules it formats with. The Dockerfile pins php:8.1.34-alpine and checks the SHA-256 of the phar, the one the current image holds. The build context is reduced to entrypoint.sh, the package being public. action.yml and examples/ go: inherited from the upstream fork, they point at oskarstark/php-cs-fixer-ga:2.18.2, another image with older rules, and no workflow of the organization uses this repository as an action. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The current .dockerignore/Dockerfile combination can break docker build/docker compose build by excluding the Dockerfile from context and relying on ADD --checksum without a pinned Dockerfile syntax frontend.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
This PR migrates the project’s PHP-CS-Fixer container image publishing to GitHub Container Registry (GHCR), pins the image contents for reproducibility, and removes the unused “action wrapper” artifacts inherited from the upstream fork.
Changes:
- Add a dedicated
DockerGitHub Actions workflow to build (PR) and publish (master / manual) the container image toghcr.io. - Pin the base image and PHP-CS-Fixer phar (version + SHA-256), and adjust the Dockerfile accordingly.
- Remove the unused
action.yml+examples/action wrapper, renamedocker-compose.yml→compose.yml, and update README fordocker://ghcr.io/...usage.
| File | Description |
|---|---|
| README.md | Updates documentation to use the GHCR-hosted docker:// image and describes version/tag expectations. |
| examples/.github/workflows/push.yml | Removes legacy example workflow tied to the old upstream image/action pattern. |
| Dockerfile | Pins base image and downloads php-cs-fixer.phar with a checksum, then uses entrypoint.sh as entrypoint. |
| docker-compose.yml | Removes the old compose file referencing the prior registry/image location. |
| compose.yml | Adds replacement compose file pointing at the GHCR image tag. |
| action.yml | Removes unused action metadata that pointed to the old upstream container image. |
| .github/workflows/docker.yml | Adds CI workflow to build on PR and publish on master / manual dispatch. |
| .dockerignore | Shrinks Docker build context to only the required runtime entrypoint file. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
It calls mobsuccess-devops/github-actions-asana, which is archived, and the policy no longer has an asana entry, so ms-bot will not bring it back. The check is not required on master. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ent versions Both still asked for ubuntu-20.04, a runner image GitHub has retired: the Mobsuccess PR Compliance job stayed queued forever. These are the files ms-bot writes today (the policy's sources with its header), byte for byte the ones in github-actions-kuberneteslint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Removing it left the pull request waiting on a required check that nothing reports. The file goes back as it is on master; it can be removed once Asana is dropped from the branch protection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Maximus fast — Ready to merge ✅Every required gate passed on Required actionNo action required: the verified GitHub merge strategy will be applied. Check status
|

What Does It Do?
ghcr.io/mobsuccess-devops/github-actions-php-cs-fixer) from a workflow.docker.ymlbuilds the image on a pull request that touches it (no push), and publishes it onmasterwhen theDockerfileorentrypoint.shchange, or when run by hand. The tag is the PHP-CS-Fixer version (v3.13.0), plus the commit SHA.php:8.1.34-alpine, and the phar is checked against its SHA-256, which is the one the current image holds.action.ymlandexamples/: inherited from the upstream fork, they point atoskarstark/php-cs-fixer-ga:2.18.2, another image with older rules. No workflow of the organization uses this repository as an action; the only use is thedocker://step ofmobsuccess.mobsuccess.ymlandclosed.ymlto the versions ms-bot writes today. Both asked forubuntu-20.04, a runner image GitHub has retired, so theMobsuccess PR Compliancejob stayed queued forever. They are byte for byte the files of github-actions-kuberneteslint.docker-compose.ymltocompose.yml, and rewrites the README for thedocker://ghcr.io/…:v3.13.0usage.asana.ymlstays for now: it calls an archived action and the policy no longer has anasanaentry, butAsanais still a required check onmaster. It can be removed once the check is dropped from the branch protection.Context
The PHP-CS-Fixer check of
mobsuccessfails withtoomanyrequests: Data limit exceeded: 7 runs ofphp.ymlsince September 28, 4 of them on September 30. The image is pulled anonymously from ECR Public, which caps those pulls on the IPs GitHub runners share. It only weighs 34 MB, so making it smaller would not help: same cause as the Kubernetes lint (mobsuccess-devops/github-actions-kuberneteslint#41), same fix. The image was also pushed by hand, from no workflow.The tag carries the PHP-CS-Fixer version on purpose: another version has other rules and would fail the check on the whole code base. For the same reason the image is not republished on every push to
master, only when what it is made of changes: the content behindv3.13.0must not move when ms-bot updates a workflow.The package is public, so that workflows pull it without credentials. What is in it: PHP, the PHP-CS-Fixer phar and
entrypoint.sh, which the ECR Public image already exposed..dockerignorereduces the build context toentrypoint.sh.After the merge, in this order
Dockerworkflow onmastercreates the package, private as any package first published.github-actions-php-cs-fixer→ Package settings → Danger Zone → Change visibility → Public. This cannot be undone.docker pull ghcr.io/mobsuccess-devops/github-actions-php-cs-fixer:v3.13.0works without being logged in.mobsuccessmovesphp.ymland theMakefileto the ghcr.io image. No bot here: it is the only repository using it.Until step 4,
mobsuccesskeeps pulling the ECR Public image, which does not change.Test Plan
mobsuccess(33,000 PHP files) with the arguments of its workflow; their outputs only differ by the PHP version lineactionlint,yamllintandhadolint: nothing reportedDockerrun builds the image (first run of the new workflow)Dockerrun onmasterpushesv3.13.0to ghcr.iodocker pullworks🤖 Generated with Claude Code