Skip to content

Commit b9736ee

Browse files
author
Nick Fields
committed
fix: clean workDirectory before cloning private action
1 parent 9e4b9c4 commit b9736ee

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

dist/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12065,6 +12065,8 @@ function runAction(opts) {
1206512065
core.startGroup('Cloning private action');
1206612066
repoUrl = "https://" + opts.token + "@github.com/" + repo + ".git";
1206712067
cmd = ['git clone', repoUrl, opts.workDirectory].join(' ');
12068+
core.info("Cleaning workDirectory");
12069+
rimraf_1.sync(opts.workDirectory);
1206812070
core.info("Cloning action from https://***TOKEN***@github.com/" + repo + ".git" + (sha ? " (SHA: " + sha + ")" : ''));
1206912071
return [4 /*yield*/, exec.exec(cmd)];
1207012072
case 1:

src/action.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ export async function runAction(opts: {
4646
const repoUrl = `https://${opts.token}@github.com/${repo}.git`;
4747
const cmd = ['git clone', repoUrl, opts.workDirectory].join(' ');
4848

49+
core.info(`Cleaning workDirectory`);
50+
sync(opts.workDirectory);
51+
4952
core.info(
5053
`Cloning action from https://***TOKEN***@github.com/${repo}.git${sha ? ` (SHA: ${sha})` : ''}`
5154
);

0 commit comments

Comments
 (0)