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
9d66257a91
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 9
      .github/workflows/update-stable-from-master.yml

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

@ -85,4 +85,11 @@ jobs:
- name: Push stable (force-with-lease)
run: |
# Safer than --force; refuses if remote moved unexpectedly (protects against races)
git push origin stable:stable --force-with-lease=stable
REMOTE_STABLE_SHA="$(git rev-parse refs/remotes/origin/stable || echo '')"
if [ -z "$REMOTE_STABLE_SHA" ]; then
# If remote stable doesn't exist, just use --force-with-lease=stable (no SHA)
git push origin stable:stable --force-with-lease=stable
else
# Use the specific SHA for maximum safety
git push origin stable:stable --force-with-lease=stable:$REMOTE_STABLE_SHA
fi

Loading…
Cancel
Save