Commit d40d2242 authored by Yong Tang's avatar Yong Tang Committed by GitHub

Add additional permissions (#5217)

* Add additional permissions
Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Fix yamllint warning
Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>
parent f5acb9d1
......@@ -14,9 +14,9 @@ permissions:
jobs:
analyze:
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/autobuild to send a status report
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/autobuild to send a status report
name: Analyze
runs-on: ubuntu-latest
......
......@@ -4,9 +4,13 @@ on:
schedule:
- cron: '22 10 * * 1'
permissions: read-all
jobs:
fix:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
......
......@@ -4,9 +4,13 @@ on:
schedule:
- cron: '22 10 * * 3'
permissions: read-all
jobs:
fix:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Install Go
uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492
......
......@@ -4,9 +4,13 @@ on:
schedule:
- cron: '22 10 * * 0'
permissions: read-all
jobs:
fix:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
......
......@@ -5,6 +5,8 @@ on:
branches:
- master
permissions: read-all
jobs:
gofmt:
name: Go Fmt
......
......@@ -9,8 +9,8 @@ permissions:
jobs:
stale:
permissions:
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-latest
steps:
- uses: actions/stale@7fb802b3079a276cf3c7e6ba9aa003c665b3f838
......
......@@ -4,9 +4,13 @@ on:
schedule:
- cron: '22 10 * * 2'
permissions: read-all
jobs:
fix:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
......
name: 'Yamllint GitHub Actions'
on:
- pull_request
permissions: read-all
jobs:
yamllint:
name: 'Yamllint'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment