Skip to content

Commit

Permalink
gotta catch em all
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Hall <jason@chainguard.dev>
  • Loading branch information
imjasonh committed Jan 28, 2024
1 parent 49a2b76 commit 9e3e620
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ fetch(`${actionsUrl}?audience=octo-sts.dev`, { headers: { 'Authorization': `Bear
const ghtok = json.token;
fetch(`https://octo-sts.dev/sts/exchange?scope=${scope}&identity=${identity}`, { headers: { 'Authorization': `Bearer ${ghtok}` } })
.then(res => res.json())
.catch(err => { console.log(`::error::${err}`); process.exit(1); })
.then(json => {
if (!json.token) {
console.log(`::error::${json.message}`);
Expand All @@ -16,12 +17,6 @@ fetch(`${actionsUrl}?audience=octo-sts.dev`, { headers: { 'Authorization': `Bear
console.log(`::add-mask::${tok}`);
process.env.GITHUB_OUTPUT += `token=${tok}`;
})
.catch(err => {
console.log(`::error::${err}`);
process.exit(1);
});
.catch(err => { console.log(`::error::${err}`); process.exit(1); });
})
.catch(err => {
console.log(`::error::${err}`);
process.exit(1);
});
.catch(err => { console.log(`::error::${err}`); process.exit(1); });

0 comments on commit 9e3e620

Please sign in to comment.