This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Dependency Capability Scanner | |
| on: | |
| pull_request: | |
| jobs: | |
| capslock: | |
| name: Run capslock | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Checkout base branch | |
| run: git fetch origin ${{ github.event.pull_request.base.ref }} && git pull origin ${{ github.event.pull_request.base.ref }} | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install capslock | |
| run: go install github.com/google/capslock/cmd/capslock@latest | |
| - name: Install capslock-git-diff | |
| run: go install github.com/google/capslock/cmd/capslock-git-diff@latest | |
| - name: Run Capslock linter | |
| run: capslock-git-diff -v ${{ github.event.pull_request.base.ref }} . > capslock-output | |
| - name: Create comment | |
| uses: peter-evans/create-or-update-comment@v4 | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body-path: capslock-output |