Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applying conditional settings for PR Builds #954

Closed
wants to merge 0 commits into from

Conversation

aholstrup1
Copy link
Collaborator

AL-GO doesn't apply conditional settings on PR Builds. In BCApps we have the following conditional setting in the project settings

"buildModes": [ "Translated" ],
"ConditionalSettings": [
        {
            "branches": [
                "releases/*.[0-5]"
            ],
            "settings": {
                "buildModes": [ "Translated", "Strict"]
            }
        }
    ]

Yet when you see the PR builds, it doesn't build in StrictMode:
https://github.com/microsoft/BCApps/actions/runs/8044365490

In ReadSettings we only apply conditional settings if the branchname matches the pattern in the setting. The problem is that the branchName is set to GITHUB_BASE_REF which for PR builds triggered by the pull_request trigger is the merge branch (e.g. refs/heads/merge/123). The branch pattern for the conditional setting will therefore never match on PR Builds.

@aholstrup1 aholstrup1 requested a review from a team as a code owner February 26, 2024 09:55
Actions/AL-Go-Helper.ps1 Fixed Show fixed Hide fixed
Actions/AL-Go-Helper.ps1 Outdated Show resolved Hide resolved
mazhelez
mazhelez previously approved these changes Feb 26, 2024
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.

2 participants