9
9
interruptible : true
10
10
11
11
variables :
12
+ GH_PROJECT_PATH : " MatrixAI/${CI_PROJECT_NAME}"
13
+ GH_PROJECT_URL : " https://${GITHUB_TOKEN}@github.com/${GH_PROJECT_PATH}.git"
12
14
GIT_SUBMODULE_STRATEGY : recursive
13
15
# Cache .npm
14
16
NPM_CONFIG_CACHE : " ${CI_PROJECT_DIR}/tmp/npm"
@@ -97,7 +99,7 @@ build:merge:
97
99
allow_failure : true
98
100
script :
99
101
# Required for `gh pr create`
100
- - git remote add upstream "https://${GITHUB_TOKEN}@github.com/MatrixAI/TypeScript-Demo-Lib-Native.git "
102
+ - git remote add upstream "$GH_PROJECT_URL "
101
103
- >
102
104
nix-shell -I nixpkgs=./pkgs.nix --packages gitAndTools.gh --run '
103
105
gh pr create \
@@ -107,11 +109,11 @@ build:merge:
107
109
--body "This is an automatic PR generated by the pipeline CI/CD. This will be automatically fast-forward merged if successful." \
108
110
--assignee "@me" \
109
111
--no-maintainer-edit \
110
- --repo MatrixAI/TypeScript-Demo-Lib-Native || true;
112
+ --repo "$GH_PROJECT_PATH" || true;
111
113
printf "Pipeline Attempt on ${CI_PIPELINE_ID} for ${CI_COMMIT_SHA}\n\n${CI_PIPELINE_URL}" \
112
114
| gh pr comment staging \
113
115
--body-file - \
114
- --repo MatrixAI/TypeScript-Demo-Lib-Native ;
116
+ --repo "$GH_PROJECT_PATH" ;
115
117
'
116
118
rules :
117
119
# Runs on staging commits and ignores version commits
@@ -245,7 +247,7 @@ build:prerelease:
245
247
--notes "" \
246
248
--prerelease \
247
249
--target staging \
248
- --repo MatrixAI/TypeScript-Demo-Lib-Native ;
250
+ --repo "$GH_PROJECT_PATH" ;
249
251
'
250
252
after_script :
251
253
- rm -f ./.npmrc
@@ -420,7 +422,7 @@ integration:prerelease:
420
422
- echo 'Publishing application prerelease'
421
423
- >
422
424
nix-shell -I nixpkgs=./pkgs.nix --packages gitAndTools.gh --run '
423
- if gh release view "$CI_COMMIT_TAG" --repo MatrixAI/TypeScript-Demo-Lib-Native >/dev/null; then \
425
+ if gh release view "$CI_COMMIT_TAG" --repo "$GH_PROJECT_PATH" >/dev/null; then \
424
426
gh release \
425
427
upload "$CI_COMMIT_TAG" \
426
428
builds/*.closure.gz \
@@ -429,7 +431,7 @@ integration:prerelease:
429
431
builds/*-win-* \
430
432
builds/*-macos-* \
431
433
--clobber \
432
- --repo MatrixAI/TypeScript-Demo-Lib-Native ; \
434
+ --repo "$GH_PROJECT_PATH" ; \
433
435
else \
434
436
gh release \
435
437
create "$CI_COMMIT_TAG" \
@@ -442,7 +444,7 @@ integration:prerelease:
442
444
--notes "" \
443
445
--prerelease \
444
446
--target staging \
445
- --repo MatrixAI/TypeScript-Demo-Lib-Native ; \
447
+ --repo "$GH_PROJECT_PATH" ; \
446
448
fi;
447
449
'
448
450
rules :
@@ -486,9 +488,9 @@ integration:merge:
486
488
printf "Pipeline Succeeded on ${CI_PIPELINE_ID} for ${CI_COMMIT_SHA}\n\n${CI_PIPELINE_URL}" \
487
489
| gh pr comment staging \
488
490
--body-file - \
489
- --repo MatrixAI/TypeScript-Demo-Lib-Native ;
491
+ --repo "$GH_PROJECT_PATH" ;
490
492
'
491
- - git remote add upstream "https://${GITHUB_TOKEN}@github.com/MatrixAI/TypeScript-Demo-Lib-Native.git "
493
+ - git remote add upstream "$GH_PROJECT_URL "
492
494
- git checkout origin/master
493
495
# Merge up to the current commit (not the latest commit)
494
496
- git merge --ff-only "$CI_COMMIT_SHA"
@@ -575,7 +577,7 @@ release:distribution:
575
577
--title "Build-$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \
576
578
--notes "" \
577
579
--target master \
578
- --repo MatrixAI/TypeScript-Demo-Lib-Native ;
580
+ --repo "$GH_PROJECT_PATH" ;
579
581
'
580
582
after_script :
581
583
- rm -f ./.npmrc
0 commit comments