Update .gitlab-ci.yml file
This commit is contained in:
parent
b7778d76b0
commit
d879d62286
1 changed files with 15 additions and 9 deletions
|
@ -11,14 +11,20 @@ update_patched_master:
|
|||
- patched_changes
|
||||
script:
|
||||
- apk add --no-cache git
|
||||
- git config user.name "$GITLAB_USER_NAME"
|
||||
- git config user.email "$GITLAB_USER_EMAIL"
|
||||
- echo "Setting remote URL with authentication..."
|
||||
- git remote set-url origin https://oauth2:${CI_JOB_TOKEN}@git.haveno.com/${CI_PROJECT_PATH}.git
|
||||
- echo "Fetching all branches..."
|
||||
- git fetch --all
|
||||
- echo "Resetting patched_master to patched_changes..."
|
||||
stages:
|
||||
- update_patched_master
|
||||
|
||||
update_patched_master:
|
||||
stage: update_patched_master
|
||||
only:
|
||||
- patched_changes
|
||||
script:
|
||||
- echo "Cloning repository locally..."
|
||||
- git clone ${CI_PROJECT_DIR} /tmp/repo
|
||||
- cd /tmp/repo
|
||||
- echo "Checking out patched_master branch..."
|
||||
- git checkout patched_master || git checkout -b patched_master
|
||||
- echo "Resetting patched_master to patched_changes..."
|
||||
- git reset --hard origin/patched_changes
|
||||
- echo "Force-pushing patched_master to match patched_changes..."
|
||||
- echo "Pushing updated patched_master branch..."
|
||||
- git push origin patched_master --force
|
Loading…
Reference in a new issue