Skip to content

Suggestion: don't build and push images for pull requests - #58

Open
JAG-UK wants to merge 1 commit into
mainfrom
suggestion/no-image-publish-on-pr
Open

JAG-UK wants to merge 1 commit into
mainfrom
suggestion/no-image-publish-on-pr

Conversation

@JAG-UK

@JAG-UK JAG-UK commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

This is a suggestion from a security read-through of the repo, not a required fix. If you rely on the per-PR images, close this.

What

publish-new-build.yml runs on pull_request, and its build-and-publish job uses the production-fidl environment. So code from any same-repo PR branch (the Dockerfile, build scripts) runs with the ECR push credentials before anyone has reviewed it, and pushes a pr-N image to the public registry.

This adds one condition so the image job is skipped on pull_request. Format, clippy and tests (code-check) still run on PRs; images are still built on push to main and on manual dispatch.

Trade-offs — your call

  • PRs no longer prove the Docker image builds. If you want that check, the alternative is a build-without-push job that doesn't use the environment.
  • If anything deploys or pulls the pr-N images, this breaks it. I did not find such a use.

Fork PRs were never affected (they get no secrets). The same change was proposed for the oracle service in fidlabs/filecoin-oracle-service#59, where the PR's own run confirmed the job is skipped.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant