Repository navigation
fix: fix for icm issue - #509
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Both deployment workflows allow successful same-repository PR validation runs to trigger production deployment and Azure login even though those runs do not publish images.
1 open issue
What changed in this PR
This PR hardens the Docker build and Azure deployment workflows by restricting production access during pull request builds and adding checks on completed builds before deployment.
Changes:
- Excludes pull request builds from the production environment and Azure/ACR login steps.
- Prevents image publishing for pull request events.
- Gates automatic deployments on successful builds originating from the same repository.
| File | Description |
|---|---|
.github/workflows/deploy.yml |
Adds repository and build-success checks before deployment. |
.github/workflows/deploy-v2.yml |
Adds the same checks before input validation and downstream deployment. |
.github/workflows/build-docker.yml |
Restricts production environment selection and login steps for PR builds. |
.github/workflows/build-docker-images.yml |
Excludes PR events from the image-publishing condition. |
Review effort: Balanced
Roopan-Microsoft
approved these changes
Nov 5, 2026
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.

Purpose
This pull request improves the security and reliability of the CI/CD GitHub Actions workflows by ensuring that sensitive deployment steps and credentials are never used in pull request runs or from forked repositories. It also restricts deployments to only occur when builds from the main repository have succeeded.
The most important changes are:
Security and environment handling:
.github/workflows/build-docker.yml, theenvironmentis now only set toproductionfor non-pull request events, preventing exposure of production secrets during pull request runs. The Azure login and ACR login steps are also restricted to non-pull request events..github/workflows/build-docker-images.yml, Docker images are only pushed if the event is not a pull request and the branch is one of the deployment branches, preventing accidental pushes from pull requests.Deployment restrictions:
.github/workflows/deploy.ymland.github/workflows/deploy-v2.yml, deployments are now restricted to workflow runs that originated from the main repository and only if the build succeeded, preventing deployments from forks or failed builds. [1] [2]Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information