Skip to content

Commit

Permalink
docs: update explanation for token input (actions#125)
Browse files Browse the repository at this point in the history
* chore(docs): Update explanation for token input

* docs: move token info to dedicated paragraph

* Fix typos

Co-authored-by: Federico Grandi <fgrandi30@gmail.com>
  • Loading branch information
ocean90 and EndBug committed Jan 5, 2021
1 parent 299226a commit b09a3f1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Expand Up @@ -59,7 +59,7 @@ Add a step like this to your workflow:
# Default: ''
tag: 'v1.0.0 --force'

# Token to use for pushing the commit. The default value won't trigger any workflows, you need to use a Personal Access Token for that.
# The token to use to access the GitHub API when getting the author info (see the paragraph below for more info about the tokens used by the action)
# Default: secrets.GITHUB_TOKEN
token: ${{ secrets.GITHUB_TOKEN }}
```
Expand Down Expand Up @@ -91,6 +91,12 @@ One way to use this is if you want to force push to a branch of your repo: you'l

You can use the `tag` option to enter the arguments for a `git add` command. In order for the action to isolate the tag name from the rest of the arguments, it should be the first word not preceded by an hyphen (e.g. `-a tag-name -m "some other stuff"` is ok).

### Tokens:

The token from the `token` input is only used when getting the author info from the GitHub API: usually the default GitHub token is enough but if for some reason you want to change it, you can use that input.
When pushing, the action uses the token that the local git repository has been configured with: that means that if you want to change it you'll need to do it in the steps that run before this action. For example: if you set up your repo with [`actions/checkout`](https://github.com/actions/checkout/) then you have to change the token there.
Changing the token with which the repo is configured can be useful if you want to run CI checks on the commit pushed by this action; anyway, it has to be set up outside of this action.

### Outputs:

The action provides these outputs:
Expand Down

0 comments on commit b09a3f1

Please sign in to comment.