- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 420
Open
Description
Is your feature request related to a problem? Please describe
Forcing users to add github_token: ${{ secrets.GITHUB_TOKEN }}
adds unnecessary boilerplate, since its possible to extract this token in the action.yml
file (see here for an example).
Describe the solution you'd like
Update the action.yml
file to default the github_token
input to ${{ github.token }}
, then if users want to use a personal access token or deploy key instead they can set those inputs to override it.
henryiii, oprypin, nickserv and sosiristseng
Metadata
Metadata
Assignees
Labels
Projects
Milestone
Relationships
Development
Select code repository
Activity
peaceiris commentedon May 19, 2020
Thank you for suggesting this.
When I found this feature at actions/checkout a few months ago, other official actions were still using an empty token input so I ignored to apply it to this action. I thought that it was friendly to notify users that this action will use a built-in token. Today, only 3 official actions are using the
default: ${{ github.token }}
approach.Using the
default: ${{ github.token }}
:Using an empty token input:
Personally, I think the time for using the
default: ${{ github.token }}
approach has come. The above 4 official actions will also start to use the approach.OK. I will work on this. Note that we have some considerations for using the approach. In this action, we need to manage the order of auth tokens and the behavior on fork repositories.
github_token
togithub.token
#624