fix: update git config for updating fdroid repo

This commit is contained in:
Akash Yadav
2025-01-11 16:30:15 +05:30
parent 3fdc3c1fb5
commit 3e8fbef5df

View File

@@ -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