Skip to content

feat: default the github_token input to ${{ github.token }} #309

@sean-krail

Description

@sean-krail

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.

Activity

peaceiris

peaceiris commented on May 19, 2020

@peaceiris
Owner

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.

added this to the v4.0.0 milestone on Jul 27, 2020
linked a pull request that will close this issue on Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

    Development

    Participants

    @sean-krail@peaceiris

    Issue actions

      feat: default the github_token input to ${{ github.token }} · Issue #309 · peaceiris/actions-gh-pages