CI: Setup permissions for workflows.

This commit is contained in:
Joachim Bauch 2023-01-17 11:29:54 +01:00
parent d8927601be
commit a8ffcfa156
No known key found for this signature in database
GPG key ID: 77C1D22D53E15F02
10 changed files with 34 additions and 0 deletions

View file

@ -4,6 +4,9 @@ on:
schedule: schedule:
- cron: "0 2 * * SUN" - cron: "0 2 * * SUN"
permissions:
contents: read
jobs: jobs:
check: check:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View file

@ -16,6 +16,9 @@ on:
schedule: schedule:
- cron: '28 2 * * 5' - cron: '28 2 * * 5'
permissions:
contents: read
jobs: jobs:
analyze: analyze:
name: Analyze name: Analyze

View file

@ -9,9 +9,14 @@ on:
issue_comment: issue_comment:
types: created types: created
permissions:
contents: read
jobs: jobs:
rebase: rebase:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: none
# On pull requests and if the comment starts with `/rebase` # On pull requests and if the comment starts with `/rebase`
if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase') if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase')

View file

@ -8,6 +8,9 @@ on:
tags: tags:
- "v*.*.*" - "v*.*.*"
permissions:
contents: read
jobs: jobs:
server: server:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View file

@ -12,6 +12,9 @@ on:
- '.github/workflows/docker-compose.yml' - '.github/workflows/docker-compose.yml'
- 'docker-compose.yml' - 'docker-compose.yml'
permissions:
contents: read
jobs: jobs:
pull: pull:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View file

@ -12,6 +12,9 @@ on:
- '.github/workflows/docker-janus.yml' - '.github/workflows/docker-janus.yml'
- 'docker/janus/Dockerfile' - 'docker/janus/Dockerfile'
permissions:
contents: read
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View file

@ -6,6 +6,9 @@ on:
push: push:
branches: [ master ] branches: [ master ]
permissions:
contents: read
jobs: jobs:
server: server:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View file

@ -14,6 +14,9 @@ on:
- '**.go' - '**.go'
- 'go.*' - 'go.*'
permissions:
contents: read
jobs: jobs:
lint: lint:
name: golang name: golang

View file

@ -16,6 +16,9 @@ on:
- 'go.*' - 'go.*'
- 'Makefile' - 'Makefile'
permissions:
contents: read
jobs: jobs:
create: create:
strategy: strategy:

View file

@ -16,6 +16,9 @@ on:
- 'go.*' - 'go.*'
- 'Makefile' - 'Makefile'
permissions:
contents: read
jobs: jobs:
go: go:
env: env:
@ -87,6 +90,8 @@ jobs:
parallel: true parallel: true
finish: finish:
permissions:
contents: none
needs: go needs: go
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps: