Skip to content

Commit 4fddec4

Browse files
Fix LFS push for github sync
1 parent 3e5d17c commit 4fddec4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.gitlab-ci-release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,16 @@ sync-app:
197197
script:
198198
- apt update && apt-get install -y connect-proxy
199199
- git remote add public $OAUTH_URL
200+
# Checkout the branch before the lfs commands for REF_NAME to be recognized as a local name.
201+
- git checkout $CI_COMMIT_REF_NAME
200202
- |
201203
if grep -q "filter=lfs" .gitattributes 2>/dev/null; then
202204
echo "Git LFS detected. Handling LFS objects..."
203-
git lfs fetch --all origin
204-
git lfs push --all public
205+
git lfs fetch --all origin $CI_COMMIT_REF_NAME
206+
git lfs push --all public $CI_COMMIT_REF_NAME
205207
else
206208
echo "Git LFS not detected. Skipping LFS steps."
207209
fi
208-
- git checkout $CI_COMMIT_REF_NAME
209210
# Push current branch to github
210211
- git push public $CI_COMMIT_REF_NAME
211212
# Push the latest tag we can find

0 commit comments

Comments
 (0)