Skip to content

Commit

Permalink
ci:harden permissions for all github workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Carl Zhang <[email protected]>
  • Loading branch information
XinfengZhang committed Feb 8, 2024
1 parent a438699 commit 393799a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: docs

permissions:
contents: read

on:
push:
paths-ignore:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/freebsd.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: freebsd

permissions:
contents: read

on: [push, pull_request]

jobs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ghpages.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Deploy Docs to GitHub

permissions:
contents: read

on:
release:
types: [published]
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: style

permissions:
contents: read

on: [push, pull_request]

jobs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: ubuntu

permissions:
contents: read

on: [push, pull_request]

env:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: windows

permissions:
contents: read

on: [push, pull_request]

jobs:
Expand Down

0 comments on commit 393799a

Please sign in to comment.