Skip to content

Commit 658421e

Browse files
committed
chore: adding permission example
1 parent 25e78fb commit 658421e

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ A action "List GitHub Environments" é uma action criada em JavaScript para busc
1010
Para utilizar a action em seu workflow, adicione o seguinte trecho ao seu arquivo de configuração YAML do GitHub Actions (por exemplo, `.github/workflows/main.yml`):
1111

1212
```yaml
13-
- name: List environments
14-
id: github-environments
15-
uses: eteg/list-github-environments@v1
16-
with:
17-
exclude-envs: '["staging", "develop"]'
18-
has-protection-rule: true
19-
repo-token: "${{ secrets.GITHUB_TOKEN }}"
13+
permissions:
14+
actions: read
15+
...
16+
steps:
17+
- name: List environments
18+
id: github-environments
19+
uses: eteg/list-github-environments@v1
20+
with:
21+
exclude-envs: '["staging", "develop"]'
22+
has-protection-rule: true
23+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
2024
```
2125
2226
**Observação importante:** Não esquecer de adicionar a permission ***actions:read*** no job onde o step do **eteg/list-github-environments** atuará.
@@ -45,6 +49,8 @@ jobs:
4549
list-environments:
4650
name: List GitHub Environments
4751
runs-on: ubuntu-latest
52+
permissions:
53+
actions: read
4854
steps:
4955
- name: Checkout code
5056
uses: actions/checkout@v2

0 commit comments

Comments
 (0)