Repository navigation
chore(docker): rebuild PHP-CS-Fixer on alpine PHP packages [FTTECH-15121] - #10
nicolasotmani wants to merge 4 commits into
Conversation
Anonymous pulls of the public ECR image hit Data limit exceeded on shared GitHub runner IPs. Point the action at its Dockerfile so CI builds locally. Co-authored-by: Cursor <cursoragent@cursor.com>
Match the kuberneteslint approach: slim the published ECR image and push it via upgrade-aws.yml so consumers keep docker://...:v3.13.0 unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
| - name: Build | ||
| run: docker-compose build --build-arg BUILDKIT_INLINE_CACHE=1 | ||
| - name: Push | ||
| run: docker-compose push |
There was a problem hiding this comment.
J'avais oublié de modifier ça sur ma PR ;)
| - name: Build | |
| run: docker-compose build --build-arg BUILDKIT_INLINE_CACHE=1 | |
| - name: Push | |
| run: docker-compose push | |
| - name: Build | |
| run: docker compose build --build-arg BUILDKIT_INLINE_CACHE=1 | |
| - name: Push | |
| run: docker compose push |
There was a problem hiding this comment.
Fixed: switched to docker compose.
For the IAM role: noted — GHA,github-actions-php-cs-fixer still needs to be created before this workflow can push. Happy to follow whatever process you used for github-actions-kuberneteslint / github-actions-black if you point me at it.
| # Match mobsuccess: PHP 8.1.34 + php-cs-fixer 3.13.0. Use the cli-alpine | ||
| # variant (not the fuller php:8.1-alpine default) to keep the ECR image small. |
There was a problem hiding this comment.
php:8.1-alpine et php:8.1.34-cli-alpine sont la même image, Claude a comparé leurs empreintes sur Docker Hub, elles sont identiques aujourd'hui.
There was a problem hiding this comment.
Agreed — same digest today. Kept the 8.1.34-cli-alpine pin to match mobsuccess’s PHP version explicitly, and dropped the claim that this is a size win versus php:8.1-alpine.
Address review: docker compose v2 CLI, and note that php:8.1.34-cli-alpine matches php:8.1-alpine's digest today so this is a version pin, not a size win. Co-authored-by: Cursor <cursoragent@cursor.com>
What Does It Do?
Rebuilds the PHP-CS-Fixer image on
alpine:3.19with Alpine PHP 8.2 packages (CLI only) and the same php-cs-fixer v3.13.0 phar, instead of the fullerphp:8.1-alpinebase. Addsupgrade-aws.ymlso a push to master republishespublic.ecr.aws/u9q7y3l4/github-actions-php-cs-fixer:v3.13.0. Pointsaction.ymlat that ECR image (consumers already use it).Context
Same class of failure as kuberneteslint#40 / FTTECH-15116: intermittent
toomanyrequests: Data limit exceededwhen GitHub runners pull anonymously from ECR Public.Unlike kuberneteslint (359 MB → 70 MB), this image was already alpine-based (~32 MB). The change still follows the same pattern: slim the published image and overwrite the existing ECR tag, so every repository on
docker://public.ecr.aws/u9q7y3l4/github-actions-php-cs-fixer:v3.13.0picks it up at the next CI run with no consumer PR.Test plan
docker compose buildsucceeds forlinux/amd64php-cs-fixer --versionreports 3.13.0 in the built image-w /github/workspace, workspace mounted) against a known-good and a known-bad PHP filev3.13.0, and a consumer PHP-CS-Fixer job pulls the new image without changing its workflow