mirror of
https://github.com/wagoid/commitlint-github-action.git
synced 2025-11-07 16:06:56 +00:00
ci: restrict permissions for the GITHUB_TOKEN in .github/workflows/ci.yml (#231)
Co-authored-by: Step Security <bot@stepsecurity.io>
This commit is contained in:
parent
59203cb6ee
commit
0e361e0644
1 changed files with 4 additions and 0 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
|
@ -3,6 +3,8 @@ on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sanity-checks:
|
sanity-checks:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
name: Sanity Checks
|
name: Sanity Checks
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -22,6 +24,8 @@ jobs:
|
||||||
- run: npm run lint
|
- run: npm run lint
|
||||||
- run: npm test -- --ci --coverage
|
- run: npm test -- --ci --coverage
|
||||||
release:
|
release:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
needs: sanity-checks
|
needs: sanity-checks
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: "github.ref == 'refs/heads/master' && !contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
|
if: "github.ref == 'refs/heads/master' && !contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue