Skip to content

Commit 8722536

Browse files
committed
chore: enhance GitHub Actions workflow for ReleaseKit
- Added local Git configuration to disable automatic garbage collection. - Implemented a check to ensure the workflow is on a branch with proper remote tracking, improving reliability during the release process.
1 parent 56917a9 commit 8722536

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/_release.reusable.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,12 @@ jobs:
217217
git config user.name "github-actions[bot]"
218218
git config user.email "github-actions[bot]@users.noreply.github.com"
219219
git config --global --add safe.directory "${{ github.workspace }}"
220+
git config --local gc.auto 0
221+
# Ensure we're on a branch with proper remote tracking
222+
if ! git symbolic-ref HEAD > /dev/null 2>&1; then
223+
echo "Currently in detached HEAD, checking out branch..."
224+
git checkout -B ${{ inputs.branch || 'main' }} origin/${{ inputs.branch || 'main' }} 2>/dev/null || git checkout ${{ inputs.branch || 'main' }}
225+
fi
220226
221227
- name: Run ReleaseKit
222228
id: releasekit

0 commit comments

Comments
 (0)