@@ -33,7 +33,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
3333const core = __importStar(__nccwpck_require__(2186));
3434const github = __importStar(__nccwpck_require__(5438));
3535const exec_1 = __nccwpck_require__(1514);
36- const child_process_1 = __nccwpck_require__(3129);
3736const sqlite3_1 = __importDefault(__nccwpck_require__(4946));
3837const sqlite_1 = __nccwpck_require__(2515);
3938const dbfile = 'github-archive.db';
@@ -58,8 +57,14 @@ async function run() {
5857 core.debug('Configured git user.name/user.email');
5958 // Create the oprhan github-meta branch if it doesn't exist
6059 const branch = core.getInput('branch');
61- const branchExists = child_process_1.execSync(`git branch --list ${branch}`).toString().trim() !== '';
62- if (!branchExists) {
60+ const branchExists = await exec_1.exec('git', [
61+ 'fetch',
62+ 'origin',
63+ branch,
64+ '--depth',
65+ '1',
66+ ]);
67+ if (branchExists !== 0) {
6368 core.info(`No ${branch} branch exists, creating...`);
6469 await exec_1.exec('git', ['checkout', '--orphan', branch]);
6570 await exec_1.exec('git', ['rm', '-rf', '.']);
@@ -73,7 +78,6 @@ async function run() {
7378 else {
7479 core.info(`Checking out ${branch}`);
7580 await exec_1.exec('git', ['checkout', '-t', `origin/${branch}`]);
76- await exec_1.exec('git', ['pull']);
7781 }
7882 // open the database
7983 const db = await sqlite_1.open({
0 commit comments