Skip to content

Commit

Permalink
build: use token based auth for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyperkid123 committed Dec 4, 2023
1 parent 81a5326 commit c45cfda
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@ function commitToPrevious(baseBranch: string, remote: string) {
const diffCommand = `git diff HEAD`;
const addCommand = `git add .`;
const commitToPreviousCommand = `git commit --no-edit -m "chore: [skip ci] sync dependencies"`;
// reset the original remote to allow bypass branch protection
const remoteCommand = 'git remote remove origin && git remote add origin https://${GH_TOKEN}@github.com/scalprum/scaffolding.git';
const pushCommand = `git push ${remote} ${baseBranch}`;
// check if there are any changes to be committed
const isDiff = execSync(diffCommand).toString().length > 0;
if (isDiff) {
execSync(remoteCommand);
execSync(addCommand);
execSync(commitToPreviousCommand);
execSync(pushCommand);
Expand Down
1 change: 0 additions & 1 deletion packages/core/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"version": {
"executor": "@jscutlery/semver:version",
"options": {
"push": true,
"preset": "conventionalcommits"
}
},
Expand Down
1 change: 0 additions & 1 deletion packages/react-core/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"executor": "@jscutlery/semver:version",
"options": {
"trackDeps": true,
"push": true,
"preset": "conventionalcommits"
}
},
Expand Down
1 change: 0 additions & 1 deletion packages/react-test-utils/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"executor": "@jscutlery/semver:version",
"options": {
"trackDeps": true,
"push": true,
"preset": "conventionalcommits"
}
},
Expand Down

0 comments on commit c45cfda

Please sign in to comment.