microsoft / powerplatform-actions

Power Platform GitHub Actions automate common build and deployment tasks related to Power Platform. This includes synchronization of solution metadata (a.k.a. solutions) between development environments and source control, generating build artifacts, deploying to downstream environments, provisioning/de-provisioning of environments, and the ability to perform static analysis checks against your solution using the PowerApps checker service.
MIT License
221 stars 68 forks source link

Fix `branch-solution` for Ubuntu runners. Fixes #229 #407

Closed tehcrashxor closed 1 year ago

tehcrashxor commented 1 year ago

The GH security model won't let us access repo feed secrets used in the PR validation builds in PRs from forks.
repo-local branch created from sccle:main, originally submitted as PR #405 CC: @sccle

Fixes #229 (again): Running with an ubuntu-latest runner, the branch-solution action fails with the message: Error: failed: Error: Cannot determine HEAD from remote: ...

This PR reintroduces the fix, this time also in src.

In Windows, the current code is only working due to broken line-splitting of the command output (see #406).