Commit 02d486cd authored by ashytuna's avatar ashytuna
Browse files

update yml

parent 6ce8d995
Branches
No related merge requests found
Showing with 6 additions and 3 deletions
......@@ -3,12 +3,15 @@ auto-merge:
- auto-merge
stage: deploy
script:
- foreach ($branch in @('staging/a', 'staging/b')) {
- $branches = git branch -r --list 'origin/staging/*' | ForEach-Object { $_ -replace 'origin/', '' }
- $branches = $branches | Where-Object { $_ -ne 'staging/gpu' }
- Write-Host $branches
- foreach ($branch in $branches) {
git checkout $branch;
git merge origin/main;
git merge origin/staging/gpu;
git push https://oauth2:$env:GITLAB_TOKEN@gitlab.onschool.edu.vn/tuna/tech-7260.git $branch;
}
rules:
- if: $CI_COMMIT_REF_NAME == "main" && $CI_COMMIT_MESSAGE =~ /^Merge /
- if: $CI_COMMIT_REF_NAME == "staging/gpu" && $CI_COMMIT_MESSAGE =~ /^Merge /
when: always
- when: never
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment