Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add permissions contents write #753

Merged
merged 2 commits into from
May 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
- 'ubuntu-18.04'
- 'macos-latest'
- 'windows-latest'
permissions:
contents: write
steps:
- uses: actions/checkout@v3

Expand Down
1 change: 1 addition & 0 deletions .vscode/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.log
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ on:
jobs:
deploy:
runs-on: ubuntu-20.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
Expand Down Expand Up @@ -477,6 +479,8 @@ on:
jobs:
deploy:
runs-on: ubuntu-20.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
Expand Down Expand Up @@ -570,7 +574,14 @@ fatal: unable to access 'https://github.com/username/repository.git/': The reque
Error: Action failed with "The process '/usr/bin/git' failed with exit code 128"
```

Navigate to your repository's settings / actions / general and in the "Workflow permissions" section, select "Read and write permissions":
Please add the write permission to the `permissions.contents` in a workflow/job.

```yaml
permissions:
contents: write
```

Or, navigate to your repository's settings / actions / general and in the "Workflow permissions" section, select "Read and write permissions":

<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">

Expand Down Expand Up @@ -622,6 +633,8 @@ on:
jobs:
deploy:
runs-on: ubuntu-20.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
Expand Down Expand Up @@ -662,6 +675,8 @@ on:
jobs:
deploy:
runs-on: ubuntu-20.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
Expand Down Expand Up @@ -710,6 +725,8 @@ on:
jobs:
deploy:
runs-on: ubuntu-20.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
Expand Down Expand Up @@ -760,6 +777,8 @@ on:
jobs:
deploy:
runs-on: ubuntu-20.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
Expand Down Expand Up @@ -815,6 +834,8 @@ on:
jobs:
deploy:
runs-on: ubuntu-20.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
Expand Down Expand Up @@ -868,6 +889,8 @@ on:
jobs:
deploy:
runs-on: ubuntu-20.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
defaults:
Expand Down Expand Up @@ -926,6 +949,8 @@ on:
jobs:
deploy:
runs-on: ubuntu-20.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
Expand Down Expand Up @@ -986,6 +1011,8 @@ on:
jobs:
deploy:
runs-on: ubuntu-20.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
Expand Down Expand Up @@ -1025,6 +1052,8 @@ on:
jobs:
deploy:
runs-on: ubuntu-20.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
Expand Down Expand Up @@ -1069,6 +1098,8 @@ on:
jobs:
deploy:
runs-on: ubuntu-20.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
Expand Down