From 3e8fbef5dfe411dc41f02c8aedcf6a4f1f2cf6b6 Mon Sep 17 00:00:00 2001 From: Akash Yadav Date: Sat, 11 Jan 2025 16:30:15 +0530 Subject: [PATCH] fix: update git config for updating fdroid repo --- .gitlab-ci.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0109bdd9..dab45709 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,16 +11,13 @@ update-fdroid-repo: TARGET_REPO_PATH: ironfox-oss/fdroid TARGET_REPO_BRANCH: dev REPO_DIR: './repo' - VERSION_FILE: "version.txt" before_script: - apk add --no-cache git curl openssh-client jq - - git config --global user.email "release-manager@ironfoxoss.org" - - git config --global user.name "IronFox Release Manager" + - git config --global user.email "ci@ironfoxoss.org" + - git config --global user.name "IronFox CI" script: - - git clone "https://gitlab.com/$TARGET_REPO_PATH.git" target-repo + - git clone "https://oauth2:$GITLAB_CI_PUSH_TOKEN@gitlab.com/$TARGET_REPO_PATH.git" target-repo - cd target-repo - - git remote add gitlab_ci_origin https://gitlab-ci-token:$CI_JOB_TOKEN@gitlab.com/$TARGET_REPO_PATH.git - - mkdir -p $REPO_DIR # Download all assets from the release @@ -35,11 +32,9 @@ update-fdroid-repo: curl -L --header "JOB-TOKEN: $CI_JOB_TOKEN" "$url" -o "$REPO_DIR/$name" done - - echo "$CI_COMMIT_TAG" > $VERSION_FILE - - - git add $REPO_DIR $VERSION_FILE - - git commit -m "Update for release ${CI_COMMIT_TAG}" - - git push -n gitlab_ci_origin $TARGET_REPO_BRANCH + - git add $REPO_DIR + - 'git commit -m "feat: update for release ${CI_COMMIT_TAG}"' + - git push origin HEAD:$TARGET_REPO_BRANCH docker-build: image: docker:cli