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
Implement guardrail to check for existing branches (#16132)
Added a guardrail step to prevent overwriting existing branches in the
Apple workflow to avoid accidental binaries overwrite on S3.
---------
Co-authored-by: Copilot <[email protected]>
if git ls-remote --exit-code "https://github.com/${{ github.repository }}" "refs/heads/${BRANCH}" > /dev/null 2>&1; then
51
+
echo "Branch '${BRANCH}' already exists!"
52
+
echo "Aborting workflow to prevent overwriting S3 binaries. The branch existence indicates this version was already published with specific checksums."
53
+
echo "Please delete the remote branch '${BRANCH}' and re-run this workflow."
0 commit comments