From 583e4c78d595a79469245dcce625a019e2f1406b Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Sat, 10 Aug 2024 11:36:13 -0400 Subject: [PATCH] gitlab-ci: use git-annex instead of git-lfs --- .gitlab-ci.yml | 4 +++- .gitlab/bin/build.sh | 2 +- .gitlab/bin/push.sh | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 36f5b06..35d0704 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,6 +36,7 @@ lint: - keys/ - logs/ expire_in: 7 days + when: always only: - merge_requests @@ -56,6 +57,7 @@ lint: - keys/ - logs/ expire_in: 7 days + when: always only: - merge_requests @@ -97,7 +99,7 @@ push: stage: deploy script: - | - sudo apk add abuild git-lfs findutils + sudo apk add abuild git-annex findutils export PATH="$PATH:$CI_PROJECT_DIR/.gitlab/bin" push.sh rules: diff --git a/.gitlab/bin/build.sh b/.gitlab/bin/build.sh index 3d0294f..286f965 100755 --- a/.gitlab/bin/build.sh +++ b/.gitlab/bin/build.sh @@ -8,7 +8,7 @@ set -eu -o pipefail readonly APORTSDIR=$CI_PROJECT_DIR readonly REPOS="cross backports user testing community" -readonly ALPINE_REPOS="main community testing" +readonly ALPINE_REPOS="main community" readonly ARCH=$(apk --print-arch) # gitlab variables readonly BASEBRANCH=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME diff --git a/.gitlab/bin/push.sh b/.gitlab/bin/push.sh index e93101a..0a11b0b 100755 --- a/.gitlab/bin/push.sh +++ b/.gitlab/bin/push.sh @@ -28,9 +28,11 @@ if [ -d $HOME/repo-apk ]; then git -C $HOME/repo-apk checkout $BASEBRANCH git -C $HOME/repo-apk pull --rebase else - git clone git@lab.ilot.io:ayakael/repo-apk -b $BASEBRANCH $HOME/repo-apk + git clone forgejo@ayakael.net:forge/repo-apk.git -b $BASEBRANCH $HOME/repo-apk fi +git -C $HOME/repo-apk annex sync --content + for i in $(find packages -type f -name "*.apk"); do install -vDm644 $i ${i/packages/$HOME\/repo-apk} done @@ -53,4 +55,4 @@ done git -C $HOME/repo-apk add . git -C $HOME/repo-apk commit -m "Update from $CI_MERGE_REQUEST_IID - $CI_MERGE_REQUEST_TITLE" -git -C $HOME/repo-apk push +git -C $HOME/repo-apk annex sync --content