Browse Source

Update .github/workflows/update-stable-from-master.yml

Co-authored-by: Copilot <[email protected]>
pull/895/head
Dan Ditomaso 8 months ago
committed by GitHub
parent
commit
5a65aa3b85
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 12
      .github/workflows/update-stable-from-master.yml

12
.github/workflows/update-stable-from-master.yml

@ -56,13 +56,11 @@ jobs:
fi
# 3) Fall back to main if present
for BR in main; do
if [ -z "${SHA}" ] && git ls-remote --exit-code --heads origin "${BR}" >/dev/null 2>&1; then
git fetch origin "${BR}:${BR}" --prune
SHA="$(git rev-parse "${BR}^{commit}")"
SRC_DESC="branch:${BR}"
fi
done
if [ -z "${SHA}" ] && git ls-remote --exit-code --heads origin "main" >/dev/null 2>&1; then
git fetch origin "main:main" --prune
SHA="$(git rev-parse "main^{commit}")"
SRC_DESC="branch:main"
fi
if [ -z "${SHA}" ]; then
echo "::error::Unable to resolve source commit from tag (${TAG}), target_commitish (${TARGET}), or main."

Loading…
Cancel
Save