Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/upstream-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
git checkout -B master FETCH_HEAD
git push origin master --force

# Count commits for tagging
# Count commits for tagging - this is the master branch commit count
COMMIT_COUNT=$(git rev-list --count HEAD)
echo "COMMIT_COUNT=$COMMIT_COUNT" >> $GITHUB_ENV

Expand All @@ -64,6 +64,10 @@ jobs:

BRANCH_NAME="update-dev-from-master-$(date +'%Y-%m-%d-%H-%M')"
git checkout -b $BRANCH_NAME

# Make sure branch contains master content before creating the PR
git merge --no-edit master

git push origin $BRANCH_NAME --force

PR_TITLE="Sync master with upstream release $LATEST_TAG"
Expand Down Expand Up @@ -144,10 +148,12 @@ jobs:

echo "PR merged successfully!"

# Create tag
# Create tag using master branch commit count
TAG_NAME="$COMMIT_COUNT"

# Checkout dev to apply the tag
git fetch origin dev
git checkout dev
TAG_NAME="b$COMMIT_COUNT"

# Check if tag exists
if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then
Expand Down