Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ inputs:
tag:
required: false
description: "ecr tag name"
github-token:
required: false
description: "github token for higher rate limits in downloading releases"
resource-tags:
required: false
description: "resource tags, comma separated key=value pairs"
Expand Down
100 changes: 74 additions & 26 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ async function install(): Promise<void> {
let cliPath = find(COPILOT_CLI_TOOL_NAME, version)

if (!cliPath) {
const downloadPath = await downloadTool(packageUrl, COPILOT_CLI_TOOL_NAME)
const token = core.getInput('github-token') || process.env.GITHUB_TOKEN

const downloadPath = await downloadTool(packageUrl, COPILOT_CLI_TOOL_NAME, `token ${token}`)
chmodSync(downloadPath, '755')
cliPath = await cacheFile(
downloadPath,
Expand All @@ -66,7 +68,7 @@ async function install(): Promise<void> {
}

async function getLatestVersion(): Promise<string> {
const token = process.env['GITHUB_TOKEN']
const token = core.getInput('github-token') || process.env.GITHUB_TOKEN;
const handlers = []

if (token) {
Expand Down