Skip to content

Commit

Permalink
rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
liweijie0812 committed Jan 22, 2025
1 parent 47200c1 commit 95646c0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29961,7 +29961,7 @@ function run() {
yield (0, utils_1.setGitConfig)();
// git config --global url.https://${{ secrets.MY_PAT }}@github.com/.insteadOf https://github.com/
// await exec('git', ['config', '--global', `url.https://${token}@github.com/.insteadOf`, 'https://github.com/'])
(0, utils_1.sshConfig)(token);
yield (0, utils_1.sshConfig)(token);
(0, trigger_1.default)({
owner,
repo,
Expand Down Expand Up @@ -30365,7 +30365,7 @@ function sshConfig(token) {
return __awaiter(this, void 0, void 0, function* () {
yield (0, exec_1.exec)(`ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts`);
yield (0, exec_1.exec)(`echo "${token}" > ~/.ssh/id_rsa`);
// await exec(`chmod 600 ~/.ssh/id_rsa`)
yield (0, exec_1.exec)(`chmod 600 ~/.ssh/id_rsa`);
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export async function run(): Promise<void> {
await setGitConfig()
// git config --global url.https://${{ secrets.MY_PAT }}@github.com/.insteadOf https://github.com/
// await exec('git', ['config', '--global', `url.https://${token}@github.com/.insteadOf`, 'https://github.com/'])
sshConfig(token)
await sshConfig(token)

useTrigger({
owner,
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,5 @@ export async function gitPush(repo: string, branch: string) {
export async function sshConfig(token: string) {
await exec(`ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts`)
await exec(`echo "${token}" > ~/.ssh/id_rsa`)
// await exec(`chmod 600 ~/.ssh/id_rsa`)
await exec(`chmod 600 ~/.ssh/id_rsa`)
}

0 comments on commit 95646c0

Please sign in to comment.