ci: build por PR (:pr-N) pro ambiente de review (EVO-1998)#3
Merged
Conversation
Gatilho pull_request (main/develop) + job build-pr (amd64) publicando :pr-<N> + :sha-<sha7>. Builds de branch/tag (multi-arch) guardados com if: github.event_name != 'pull_request'. Espelha o evo-flow.
Reviewer's GuideAdds a PR-specific Docker image build to the CI, including concurrency control and tag scheme changes, while gating existing multi-arch branch/tag builds and merge-manifest job to non-PR events. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The
build-prjob will currently run for PRs from forks but is likely to fail at thedocker/login-actionstep due to unavailableDOCKERHUB_*secrets; consider guarding the job with a condition likeif: github.event.pull_request.head.repo.full_name == github.repositoryor similar to skip forked PRs gracefully. - Using the same GHA cache scope (
scope=linux/amd64) for both PR and main/develop builds may cause cache churn between CI contexts; if you want to keep PR builds isolated, consider adding the event name or PR number to the cache scope forbuild-pr.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `build-pr` job will currently run for PRs from forks but is likely to fail at the `docker/login-action` step due to unavailable `DOCKERHUB_*` secrets; consider guarding the job with a condition like `if: github.event.pull_request.head.repo.full_name == github.repository` or similar to skip forked PRs gracefully.
- Using the same GHA cache scope (`scope=linux/amd64`) for both PR and main/develop builds may cause cache churn between CI contexts; if you want to keep PR builds isolated, consider adding the event name or PR number to the cache scope for `build-pr`.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
O que
Adiciona build por PR à CI deste serviço: no
pull_request(main/develop), builda a imagem amd64 e publica:pr-<N>(mutável, pro revisor) +:sha-<sha7>(imutável, do head do PR). Os builds de branch/tag (multi-arch →:latest/:develop/:vX) passam a ser guardados porif: github.event_name != 'pull_request'.Por que
Habilita o ambiente de review por PR (EVO-1998): o
review.sh(no umbrellaevo-crm-community) sobe a stack com cada serviço na imagem do seu PR (:pr-N). Sem o:pr-N, o revisor não consegue testar um PR aberto rodando. Espelha o padrão já em produção noevo-flow-community.Detalhes
build-pr: single-arch amd64 (o ambiente de review é uma máquina só; ~metade do custo do multi-arch).context/Dockerfile/build-argsidênticos ao job de build existente deste serviço.concurrency: cancela builds de PR superseded (retest reflete o último commit); nunca cancela push em main/develop.IMAGE_NAME, lógica de tags de branch/tag e matriz multi-arch intactos.Ref: EVO-1998.
Summary by Sourcery
Add pull_request-triggered Docker image builds for PR review environments while preserving existing branch/tag multi-arch builds.
New Features:
Enhancements:
CI: