You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the PublishToEnvironment workflow to deploy a PR from the main branch (using appVersion: PR_<PR_ID>), the deployment is registered against the workflow's trigger ref (main) instead of the actual PR branch being deployed.
This causes GitHub's PR interface to show "This branch has not been deployed" even though the PR has been successfully deployed.
Current Behavior
Run PublishToEnvironment workflow from main branch
Set appVersion: PR_123 to deploy a specific PR
Workflow successfully deploys the PR code
GitHub creates deployment record against main branch (workflow trigger)
Create deployment record against the PR branch (not workflow trigger ref)
PR shows correct deployment status ✅
Why This Matters
Common use case: Running deployments from main with environment protection rules, while deploying feature branch code. This pattern allows:
Centralized deployment control from main branch
Environment protection rules enforcement
PR-based artifact deployment
Clear deployment visibility in PR interface
Without proper deployment tracking, teams lose visibility into which PRs have been deployed to which environments.
Proposed Solution
Modify PublishToEnvironment.yaml Deploy job to:
Add deployments: write permission
Before deployment, detect if appVersion matches PR_<ID> pattern
If yes, fetch PR branch ref via GitHub API
Create explicit deployment record against PR branch using GitHub Deployments API
Update deployment status after deployment completes
This preserves all existing functionality while correctly tracking PR deployments.
Workaround
Users can manually add deployment tracking logic to their workflows (see solution above), but this should be built into AL-Go's template.
Environment
AL-Go Version: v8.1 (issue also present in v8.2)
Template: Per Tenant Extension (PTE)
Workflow: PublishToEnvironment.yaml
Related
GitHub's environment: key automatically creates deployments against the workflow trigger ref, which is the root cause of this issue. Explicit API calls are needed to override this behavior for PR deployments.
Description
When using the PublishToEnvironment workflow to deploy a PR from the main branch (using
appVersion: PR_<PR_ID>), the deployment is registered against the workflow's trigger ref (main) instead of the actual PR branch being deployed.This causes GitHub's PR interface to show "This branch has not been deployed" even though the PR has been successfully deployed.
Current Behavior
mainbranchappVersion: PR_123to deploy a specific PRmainbranch (workflow trigger)Expected Behavior
When
appVersionmatches patternPR_<ID>:Why This Matters
Common use case: Running deployments from
mainwith environment protection rules, while deploying feature branch code. This pattern allows:Without proper deployment tracking, teams lose visibility into which PRs have been deployed to which environments.
Proposed Solution
Modify
PublishToEnvironment.yamlDeploy job to:deployments: writepermissionappVersionmatchesPR_<ID>patternThis preserves all existing functionality while correctly tracking PR deployments.
Workaround
Users can manually add deployment tracking logic to their workflows (see solution above), but this should be built into AL-Go's template.
Environment
PublishToEnvironment.yamlRelated
GitHub's
environment:key automatically creates deployments against the workflow trigger ref, which is the root cause of this issue. Explicit API calls are needed to override this behavior for PR deployments.