Skip to content

Commit

Permalink
Add permissions required to README.md (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
francorbacho authored Oct 24, 2023
1 parent 20b64ec commit dd44271
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,28 @@ In order to use this action, you will need to generate a JSON file using the fol
]
```

## Permissions

It is possible you have a `GITHUB_TOKEN` with restricted access by default, in which case you might get the following error:

```
Error: GitHubApiUnauthorizedError: Unable to create a check, please make sure that the provided 'repo-token' has write permissions to 'your/repo' - cause: HttpError: Resource not accessible by integration
```

You need to provide the `checks` write permission:

```yaml
permissions:
checks: write
```
You can use `permissions` either as a top-level key, to apply to all jobs in the workflow, or within specific jobs.
When you add the permissions key within a specific job, all actions and run commands within that job that use the `GITHUB_TOKEN` gain the access rights you specify.

**IMPORTANT**: Setting a `permissions` field will disable all omitted permissions, like the `contents: read`, which is needed to clone and read your repository.

You can learn more about `GITHUB_TOKEN` permissions at: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token

## Inputs

### `repo-token`
Expand Down

0 comments on commit dd44271

Please sign in to comment.