mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 14:21:50 +00:00
[actions] improve default action permissions
This commit is contained in:
parent
29dce5edfd
commit
c20db2ab86
3
.github/workflows/latest-npm.yml
vendored
3
.github/workflows/latest-npm.yml
vendored
@ -2,6 +2,9 @@ name: 'Tests: `nvm install-latest-npm`'
|
|||||||
|
|
||||||
on: [pull_request, push]
|
on: [pull_request, push]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
matrix:
|
matrix:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
11
.github/workflows/lint.yml
vendored
11
.github/workflows/lint.yml
vendored
@ -2,10 +2,11 @@ name: 'Tests: linting'
|
|||||||
|
|
||||||
on: [pull_request, push]
|
on: [pull_request, push]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
eclint:
|
eclint:
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: step-security/harden-runner@v2
|
- uses: step-security/harden-runner@v2
|
||||||
@ -23,8 +24,6 @@ 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: step-security/harden-runner@v2
|
- uses: step-security/harden-runner@v2
|
||||||
@ -44,8 +43,6 @@ 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: step-security/harden-runner@v2
|
- uses: step-security/harden-runner@v2
|
||||||
@ -63,8 +60,6 @@ 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: step-security/harden-runner@v2
|
- uses: step-security/harden-runner@v2
|
||||||
|
3
.github/workflows/rebase.yml
vendored
3
.github/workflows/rebase.yml
vendored
@ -2,6 +2,9 @@ name: Automatic Rebase
|
|||||||
|
|
||||||
on: [pull_request_target]
|
on: [pull_request_target]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
_:
|
_:
|
||||||
permissions:
|
permissions:
|
||||||
|
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@ -2,10 +2,11 @@ name: 'Tests: release process'
|
|||||||
|
|
||||||
on: [pull_request, push]
|
on: [pull_request, push]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
- name: Harden Runner
|
||||||
|
3
.github/workflows/require-allow-edits.yml
vendored
3
.github/workflows/require-allow-edits.yml
vendored
@ -2,6 +2,9 @@ name: Require “Allow Edits”
|
|||||||
|
|
||||||
on: [pull_request_target]
|
on: [pull_request_target]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
_:
|
_:
|
||||||
permissions:
|
permissions:
|
||||||
|
9
.github/workflows/shellcheck.yml
vendored
9
.github/workflows/shellcheck.yml
vendored
@ -2,10 +2,11 @@ name: 'Tests: shellcheck'
|
|||||||
|
|
||||||
on: [pull_request, push]
|
on: [pull_request, push]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
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
|
||||||
@ -52,8 +53,4 @@ jobs:
|
|||||||
needs: [shellcheck_matrix]
|
needs: [shellcheck_matrix]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Harden Runner
|
|
||||||
uses: step-security/harden-runner@v2
|
|
||||||
with:
|
|
||||||
egress-policy: block
|
|
||||||
- run: true
|
- run: true
|
||||||
|
5
.github/workflows/tests.yml
vendored
5
.github/workflows/tests.yml
vendored
@ -2,6 +2,9 @@ name: urchin tests
|
|||||||
|
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
permissions:
|
permissions:
|
||||||
@ -49,6 +52,8 @@ jobs:
|
|||||||
- run: make TERM=xterm-256color TEST_SUITE="${{ matrix.suite }}" SHELL="${{ matrix.shell }}" URCHIN="$(npx which urchin)" test-${{ matrix.shell }}
|
- run: make TERM=xterm-256color TEST_SUITE="${{ matrix.suite }}" SHELL="${{ matrix.shell }}" URCHIN="$(npx which urchin)" test-${{ matrix.shell }}
|
||||||
|
|
||||||
nvm:
|
nvm:
|
||||||
|
permissions:
|
||||||
|
contents: none
|
||||||
name: 'all test suites, all shells'
|
name: 'all test suites, all shells'
|
||||||
needs: [tests]
|
needs: [tests]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
3
.github/workflows/toc.yml
vendored
3
.github/workflows/toc.yml
vendored
@ -2,6 +2,9 @@ name: update readme TOC
|
|||||||
|
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
_:
|
_:
|
||||||
permissions:
|
permissions:
|
||||||
|
3
.github/workflows/windows-npm.yml
vendored
3
.github/workflows/windows-npm.yml
vendored
@ -2,6 +2,9 @@ name: 'Tests on Windows: `nvm install`'
|
|||||||
|
|
||||||
on: [pull_request, push]
|
on: [pull_request, push]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
env:
|
env:
|
||||||
NVM_INSTALL_GITHUB_REPO: ${{ github.repository }}
|
NVM_INSTALL_GITHUB_REPO: ${{ github.repository }}
|
||||||
NVM_INSTALL_VERSION: ${{ github.sha }}
|
NVM_INSTALL_VERSION: ${{ github.sha }}
|
||||||
|
Loading…
Reference in New Issue
Block a user