diff --git a/dist/index.js b/dist/index.js index 32099c3..c02324b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -46806,6 +46806,7 @@ var require_github2 = __commonJS({ const res = yield octokit.repos.getContent({ owner, repo, + ref: `refs/heads/${branchName}`, path }); sha = res.data.sha; diff --git a/src/github.ts b/src/github.ts index 818601b..feb174c 100644 --- a/src/github.ts +++ b/src/github.ts @@ -50,7 +50,8 @@ export async function createOrUpdateFile(octokit: Octokit, owner: string, repo: const res = await octokit.repos.getContent({ owner: owner, repo: repo, - path: path, + ref: `refs/heads/${branchName}`, + path: path }); sha = (res.data as any).sha; } catch (e) {