mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 14:21:50 +00:00
[actions] restrict permissions for GITHUB_TOKEN
This commit is contained in:
parent
2dad0455ec
commit
59532c74c6
4
.github/workflows/latest-npm.yml
vendored
4
.github/workflows/latest-npm.yml
vendored
@ -4,6 +4,8 @@ on: [pull_request, push]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
nodes:
|
nodes:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
name: 'nvm install-latest-npm'
|
name: 'nvm install-latest-npm'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
@ -44,6 +46,8 @@ jobs:
|
|||||||
- run: npm --version
|
- run: npm --version
|
||||||
|
|
||||||
node:
|
node:
|
||||||
|
permissions:
|
||||||
|
contents: none
|
||||||
name: 'nvm install-latest-npm'
|
name: 'nvm install-latest-npm'
|
||||||
needs: [nodes]
|
needs: [nodes]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
8
.github/workflows/lint.yml
vendored
8
.github/workflows/lint.yml
vendored
@ -4,6 +4,8 @@ on: [pull_request, push]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
eclint:
|
eclint:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -14,6 +16,8 @@ jobs:
|
|||||||
- run: npm run eclint
|
- run: npm run eclint
|
||||||
|
|
||||||
dockerfile_lint:
|
dockerfile_lint:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -24,6 +28,8 @@ jobs:
|
|||||||
- run: npm run dockerfile_lint
|
- run: npm run dockerfile_lint
|
||||||
|
|
||||||
doctoc:
|
doctoc:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -34,6 +40,8 @@ jobs:
|
|||||||
- run: npm run doctoc:check
|
- run: npm run doctoc:check
|
||||||
|
|
||||||
test_naming:
|
test_naming:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
2
.github/workflows/rebase.yml
vendored
2
.github/workflows/rebase.yml
vendored
@ -4,6 +4,8 @@ on: [pull_request_target]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
_:
|
_:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
name: "Automatic Rebase"
|
name: "Automatic Rebase"
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -4,6 +4,8 @@ on: [pull_request, push]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
2
.github/workflows/require-allow-edits.yml
vendored
2
.github/workflows/require-allow-edits.yml
vendored
@ -4,6 +4,8 @@ on: [pull_request_target]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
_:
|
_:
|
||||||
|
permissions:
|
||||||
|
pull-requests: read
|
||||||
name: "Require “Allow Edits”"
|
name: "Require “Allow Edits”"
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
4
.github/workflows/shellcheck.yml
vendored
4
.github/workflows/shellcheck.yml
vendored
@ -4,6 +4,8 @@ on: [pull_request, push]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
shellcheck_matrix:
|
shellcheck_matrix:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@ -32,6 +34,8 @@ jobs:
|
|||||||
run: shellcheck -s ${{ matrix.shell }} ${{ matrix.file }}
|
run: shellcheck -s ${{ matrix.shell }} ${{ matrix.file }}
|
||||||
|
|
||||||
shellcheck:
|
shellcheck:
|
||||||
|
permissions:
|
||||||
|
contents: none
|
||||||
needs: [shellcheck_matrix]
|
needs: [shellcheck_matrix]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
2
.github/workflows/toc.yml
vendored
2
.github/workflows/toc.yml
vendored
@ -4,6 +4,8 @@ on: [push]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
_:
|
_:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
name: "update readme TOC"
|
name: "update readme TOC"
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
8
.github/workflows/windows-npm.yml
vendored
Executable file → Normal file
8
.github/workflows/windows-npm.yml
vendored
Executable file → Normal file
@ -9,6 +9,8 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
msys_fail_install:
|
msys_fail_install:
|
||||||
# Default installation does not work due to npm_config_prefix set to C:\npm\prefix
|
# Default installation does not work due to npm_config_prefix set to C:\npm\prefix
|
||||||
|
permissions:
|
||||||
|
contents: none
|
||||||
name: 'MSYS fail prefix nvm install'
|
name: 'MSYS fail prefix nvm install'
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
@ -20,6 +22,8 @@ jobs:
|
|||||||
! nvm install --lts
|
! nvm install --lts
|
||||||
|
|
||||||
msys_matrix:
|
msys_matrix:
|
||||||
|
permissions:
|
||||||
|
contents: none
|
||||||
name: 'MSYS nvm install'
|
name: 'MSYS nvm install'
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
strategy:
|
strategy:
|
||||||
@ -43,6 +47,8 @@ jobs:
|
|||||||
nvm install ${{ matrix.npm-node-version }}
|
nvm install ${{ matrix.npm-node-version }}
|
||||||
|
|
||||||
cygwin_matrix:
|
cygwin_matrix:
|
||||||
|
permissions:
|
||||||
|
contents: none
|
||||||
name: 'Cygwin nvm install'
|
name: 'Cygwin nvm install'
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
@ -111,6 +117,8 @@ jobs:
|
|||||||
nvm install ${{ matrix.npm-node-version }}
|
nvm install ${{ matrix.npm-node-version }}
|
||||||
|
|
||||||
nvm_windows:
|
nvm_windows:
|
||||||
|
permissions:
|
||||||
|
contents: none
|
||||||
needs: [wsl_matrix, cygwin_matrix, msys_matrix, msys_fail_install]
|
needs: [wsl_matrix, cygwin_matrix, msys_matrix, msys_fail_install]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
Loading…
Reference in New Issue
Block a user