From cbec6b608592c0ccd335092a14269dd0f0e2428e Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Mon, 24 May 2021 05:32:22 -0400 Subject: [PATCH] Added a default github_token (#91) * Added a default github_token * Update README.md * Update README.md * Update README.md * Update action.yml Co-authored-by: Adam Dobrawy Co-authored-by: Adam Dobrawy --- README.md | 6 +++--- action.yml | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8cdabfa..a40cacf 100644 --- a/README.md +++ b/README.md @@ -43,12 +43,12 @@ jobs: | name | value | default | description | | ---- | ----- | ------- | ----------- | -| github_token | string | | Token for the repo. Can be passed in using `${{ secrets.GITHUB_TOKEN }}`. | -| branch | string | (default) | Destination branch to push changes. Can be passed in using `${{ github.ref }}`. | +| github_token | string | `${{ github.token }}` | [GITHUB_TOKEN](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow) or a repo scoped [Personal Access Token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token). | +| branch | string | (default) | Destination branch to push changes.
Can be passed in using `${{ github.ref }}`. | | force | boolean | false | Determines if force push is used. | | tags | boolean | false | Determines if `--tags` is used. | | directory | string | '.' | Directory to change to before pushing. | -| repository | string | '' | Repository name. Default or empty repository name represents current github repository. If you want to push to other repository, you should make a [personal access token](https://github.com/settings/tokens) and use it as the `github_token` input. | +| repository | string | '' | Repository name.
Default or empty repository name represents current github repository.
If you want to push to other repository, you should make a
[personal access token](https://github.com/settings/tokens) and use it as the `github_token` input. | ## License diff --git a/action.yml b/action.yml index b06932b..9453dc9 100644 --- a/action.yml +++ b/action.yml @@ -6,8 +6,9 @@ branding: color: green inputs: github_token: - description: 'Token for the repo. Can be passed in using $\{{ secrets.GITHUB_TOKEN }}' + description: 'GitHub token or PAT token' required: true + default: ${{ github.token }] repository: description: 'Repository name to push. Default or empty value represents current github repository (${GITHUB_REPOSITORY})' default: ''