Skip to content

Commit

Permalink
doc: add wildcard documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
qoomon committed Oct 7, 2022
1 parent 384e53a commit 85bf02b
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,34 @@ Manage access from GitHub actions workflows by providing temporary app access to
* Create `.github/access.yaml` file
* Set `self` to enclosing repository.
* This ensures no unintended access in case you fork a repository with `.github/access.yaml` file.
* Add policies and [permissions](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token), see examples below.
* Add `policies` and [permissions](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token), see examples below.
* `repository` value supports wildcards `*` e.g. `repository: octa-org/*`
*`metadata: read` permission is implicitly always granted.
##### Example configurations
* Grant read access to GitHub Packages
```yaml
self: example/test
policies:
- repository: example/sandbox
permissions:
packages: read
```
* Self access to trigger workflows from another workflow
```yaml
self: example/test
self: qoomon/example
policies:
- repository: self
permissions:
actions: write
```
* Grant read access to GitHub Packages for an explicit repository
```yaml
self: qoomon/example
policies:
- repository: qoomon/sandbox
permissions:
packages: read
```
* Grant read access to GitHub Packages for an entire organization
```yaml
self: qoomon/example
policies:
- repository: octa-org/*
permissions:
packages: read
```
### Setup GitHub Action Workflow
```yaml
on:
Expand Down

0 comments on commit 85bf02b

Please sign in to comment.