Skip to content

Commit 057a6ba

Browse files
authored
Fix passing token to GitHub
1 parent 821c9b7 commit 057a6ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

start.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const main = async () => {
4646
const headers = {
4747
'User-Agent': 'github.com/ad-m/github-push-action'
4848
};
49-
if (process.env.GITHUB_TOKEN) headers.Authorization = `token ${process.env.GITHUB_TOKEN}`;
49+
if (process.env.INPUT_GITHUB_TOKEN) headers.Authorization = `token ${process.env.INPUT_GITHUB_TOKEN}`;
5050
const body = JSON.parse(await get(`https://api.github.com/repos/${repository}`, { headers }))
5151
branch = body.default_branch;
5252
}

0 commit comments

Comments
 (0)