Skip to content

Commit 414c92c

Browse files
authored
docs: add permissions contents write (#753)
1 parent 9084ef1 commit 414c92c

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
- 'ubuntu-18.04'
2424
- 'macos-latest'
2525
- 'windows-latest'
26+
permissions:
27+
contents: write
2628
steps:
2729
- uses: actions/checkout@v3
2830

.vscode/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.log

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ on:
143143
jobs:
144144
deploy:
145145
runs-on: ubuntu-20.04
146+
permissions:
147+
contents: write
146148
concurrency:
147149
group: ${{ github.workflow }}-${{ github.ref }}
148150
steps:
@@ -477,6 +479,8 @@ on:
477479
jobs:
478480
deploy:
479481
runs-on: ubuntu-20.04
482+
permissions:
483+
contents: write
480484
concurrency:
481485
group: ${{ github.workflow }}-${{ github.ref }}
482486
steps:
@@ -570,7 +574,14 @@ fatal: unable to access 'https://github.com/username/repository.git/': The reque
570574
Error: Action failed with "The process '/usr/bin/git' failed with exit code 128"
571575
```
572576

573-
Navigate to your repository's settings / actions / general and in the "Workflow permissions" section, select "Read and write permissions":
577+
Please add the write permission to the `permissions.contents` in a workflow/job.
578+
579+
```yaml
580+
permissions:
581+
contents: write
582+
```
583+
584+
Or, navigate to your repository's settings / actions / general and in the "Workflow permissions" section, select "Read and write permissions":
574585

575586
<img width="700" alt="Enabling Read and write permissions to the GITHUB_TOKEN on GitHub Actions" src="https://user-images.githubusercontent.com/30958501/168609359-242f59a9-34c6-4272-9793-d6b2cc823837.png">
576587

@@ -622,6 +633,8 @@ on:
622633
jobs:
623634
deploy:
624635
runs-on: ubuntu-20.04
636+
permissions:
637+
contents: write
625638
concurrency:
626639
group: ${{ github.workflow }}-${{ github.ref }}
627640
steps:
@@ -662,6 +675,8 @@ on:
662675
jobs:
663676
deploy:
664677
runs-on: ubuntu-20.04
678+
permissions:
679+
contents: write
665680
concurrency:
666681
group: ${{ github.workflow }}-${{ github.ref }}
667682
steps:
@@ -710,6 +725,8 @@ on:
710725
jobs:
711726
deploy:
712727
runs-on: ubuntu-20.04
728+
permissions:
729+
contents: write
713730
concurrency:
714731
group: ${{ github.workflow }}-${{ github.ref }}
715732
steps:
@@ -760,6 +777,8 @@ on:
760777
jobs:
761778
deploy:
762779
runs-on: ubuntu-20.04
780+
permissions:
781+
contents: write
763782
concurrency:
764783
group: ${{ github.workflow }}-${{ github.ref }}
765784
steps:
@@ -815,6 +834,8 @@ on:
815834
jobs:
816835
deploy:
817836
runs-on: ubuntu-20.04
837+
permissions:
838+
contents: write
818839
concurrency:
819840
group: ${{ github.workflow }}-${{ github.ref }}
820841
steps:
@@ -868,6 +889,8 @@ on:
868889
jobs:
869890
deploy:
870891
runs-on: ubuntu-20.04
892+
permissions:
893+
contents: write
871894
concurrency:
872895
group: ${{ github.workflow }}-${{ github.ref }}
873896
defaults:
@@ -926,6 +949,8 @@ on:
926949
jobs:
927950
deploy:
928951
runs-on: ubuntu-20.04
952+
permissions:
953+
contents: write
929954
concurrency:
930955
group: ${{ github.workflow }}-${{ github.ref }}
931956
steps:
@@ -986,6 +1011,8 @@ on:
9861011
jobs:
9871012
deploy:
9881013
runs-on: ubuntu-20.04
1014+
permissions:
1015+
contents: write
9891016
concurrency:
9901017
group: ${{ github.workflow }}-${{ github.ref }}
9911018
steps:
@@ -1025,6 +1052,8 @@ on:
10251052
jobs:
10261053
deploy:
10271054
runs-on: ubuntu-20.04
1055+
permissions:
1056+
contents: write
10281057
concurrency:
10291058
group: ${{ github.workflow }}-${{ github.ref }}
10301059
steps:
@@ -1069,6 +1098,8 @@ on:
10691098
jobs:
10701099
deploy:
10711100
runs-on: ubuntu-20.04
1101+
permissions:
1102+
contents: write
10721103
concurrency:
10731104
group: ${{ github.workflow }}-${{ github.ref }}
10741105
steps:

0 commit comments

Comments
 (0)