Merge pull request #2740 from turrisxyz/naveen/feat/set-perms-actions

Set permissions for GitHub actions
This commit is contained in:
Rob Larsen
2022-04-12 11:31:13 -04:00
committed by GitHub
3 changed files with 13 additions and 0 deletions

View File

@@ -10,10 +10,15 @@ on:
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
permissions:
contents: read
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
permissions:
contents: write # for stefanzweifel/git-auto-commit-action to push code in repo
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job

View File

@@ -5,8 +5,13 @@ on:
tags:
- 'v*'
permissions:
contents: read
jobs:
build:
permissions:
contents: write # for actions/create-release to create a release
name: Upload Release Asset
runs-on: ubuntu-latest
steps:

View File

@@ -6,6 +6,9 @@ on:
pull_request:
branches: [main]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest