chore: Add permissions to workflows (#166) #1
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: Pull Request and Push Action | |
on: | |
pull_request: # Safer than pull_request_target for untrusted code | |
branches: [ main ] | |
types: [opened, synchronize, reopened, ready_for_review, review_requested, review_request_removed] | |
push: | |
branches: [ main ] # Also run on direct pushes to main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
call-test-lint: | |
uses: ./.github/workflows/test-lint.yml | |
permissions: | |
contents: read | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} |