forked from rook/rook
Automatic PR from app.stepsecurity.io (initiated by BlaineEXE) to limit permissions in github actions to only those needed. Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
38 lines
952 B
YAML
38 lines
952 B
YAML
name: Commitlint
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
branches:
|
|
- master
|
|
- release-*
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- release-*
|
|
|
|
# cancel the in-progress workflow when PR is refreshed.
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lint:
|
|
permissions:
|
|
contents: read # for actions/checkout to fetch code
|
|
pull-requests: read # for wagoid/commitlint-github-action to get commits in PR
|
|
runs-on: ubuntu-20.04
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: wagoid/commitlint-github-action@v5.4.3
|
|
with:
|
|
configFile: "./.commitlintrc.json"
|
|
helpURL: https://rook.io/docs/rook/latest/Contributing/development-flow/#commit-structure
|