Add minimum token permissions for all github workflow files (#1655)

* Add minimum token permissions for all github workflow files

* Update .github/workflows/phpdoc-to-github-pages.yml

---------

Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
This commit is contained in:
OpenTelemetry Bot 2025-07-06 18:29:47 -07:00 committed by GitHub
parent e27aac84f6
commit 7033191a74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 14 additions and 3 deletions

View File

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

View File

@ -6,14 +6,14 @@ on:
- "main"
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
documentation:
permissions:
pages: write # required for GitHub Pages deployment
id-token: write # required for GitHub Pages deployment
name: "Documentation"
runs-on: "ubuntu-latest"
steps:

View File

@ -11,6 +11,8 @@ on:
paths:
- docker/Dockerfile
- .github/workflows/publish-otel-php-base-docker-image.yml
permissions:
contents: read
jobs:
push_to_registry:
name: OpenTelemetry PHP base docker image creation

View File

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

View File

@ -9,6 +9,9 @@ on:
create:
workflow_dispatch:
permissions:
contents: read
jobs:
gitsplit:
runs-on: ubuntu-latest