Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set a token default and support private repos #33

Merged
merged 3 commits into from Dec 9, 2022
Merged

Set a token default and support private repos #33

merged 3 commits into from Dec 9, 2022

Conversation

peter-evans
Copy link
Contributor

The aim of this PR is to improve the interface and allow the action to work for private repositories.

`No GitHub token found`
)
}
const token = process.env['GITHUB_TOKEN'] || core.getInput("token")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For backwards compatibility the environment variable is used if available. If not it falls back to the token input.

@@ -2,6 +2,9 @@ name: "Install a binary from GitHub releases"
description: "Install binaries from GitHub releases"
author: "Lee Briggs"
inputs:
token:
description: 'GITHUB_TOKEN or a `repo` scoped Personal Access Token (PAT)'
default: ${{ github.token }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defaults to GITHUB_TOKEN so users don't need to specify a token in workflows unless they want to access a private repository.

@jaxxstorm
Copy link
Owner

thanks for the awesome contribution!

@jaxxstorm jaxxstorm merged commit aa41d5e into jaxxstorm:master Dec 9, 2022
@peter-evans
Copy link
Contributor Author

Thank you for maintaining this great action!

@peter-evans peter-evans deleted the token-updates branch December 12, 2022 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants