mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-08-02 19:47:17 +08:00
Add minimum token permissions for all github workflow files (#3604)
This commit is contained in:

committed by
GitHub

parent
c30b8fa9a5
commit
bca482609b
6
.github/workflows/backport.yml
vendored
6
.github/workflows/backport.yml
vendored
@ -6,8 +6,14 @@ on:
|
||||
description: "The pull request # to backport"
|
||||
required: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
backport:
|
||||
permissions:
|
||||
contents: write # required for pushing branches
|
||||
pull-requests: write # required for creating pull requests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: |
|
||||
|
3
.github/workflows/changelog.yml
vendored
3
.github/workflows/changelog.yml
vendored
@ -10,6 +10,9 @@ on:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
changelog:
|
||||
runs-on: ubuntu-latest
|
||||
|
5
.github/workflows/codeql-analysis.yml
vendored
5
.github/workflows/codeql-analysis.yml
vendored
@ -14,8 +14,13 @@ on:
|
||||
# * * * * *
|
||||
- cron: '30 1 * * *'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
CodeQL-Build:
|
||||
permissions:
|
||||
security-events: write # for github/codeql-action/analyze to upload SARIF results
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
3
.github/workflows/component-owners.yml
vendored
3
.github/workflows/component-owners.yml
vendored
@ -6,6 +6,9 @@ name: 'Component Owners'
|
||||
on:
|
||||
pull_request_target:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
run_self:
|
||||
runs-on: ubuntu-latest
|
||||
|
3
.github/workflows/core_contrib_test_0.yml
vendored
3
.github/workflows/core_contrib_test_0.yml
vendored
@ -13,6 +13,9 @@ on:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
CORE_REPO_SHA: ${{ inputs.CORE_REPO_SHA }}
|
||||
CONTRIB_REPO_SHA: ${{ inputs.CONTRIB_REPO_SHA }}
|
||||
|
@ -13,6 +13,9 @@ on:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
CORE_REPO_SHA: ${% raw %}{{ inputs.CORE_REPO_SHA }}{% endraw %}
|
||||
CONTRIB_REPO_SHA: ${% raw %}{{ inputs.CONTRIB_REPO_SHA }}{% endraw %}
|
||||
|
@ -9,6 +9,9 @@ on:
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${% raw %}{{ github.workflow }}-${{ github.head_ref || github.run_id }}{% endraw %}
|
||||
cancel-in-progress: true
|
||||
|
@ -9,6 +9,9 @@ on:
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${% raw %}{{ github.workflow }}-${{ github.head_ref || github.run_id }}{% endraw %}
|
||||
cancel-in-progress: true
|
||||
|
@ -9,6 +9,9 @@ on:
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${% raw %}{{ github.workflow }}-${{ github.head_ref || github.run_id }}{% endraw %}
|
||||
cancel-in-progress: true
|
||||
|
3
.github/workflows/lint_0.yml
vendored
3
.github/workflows/lint_0.yml
vendored
@ -9,6 +9,9 @@ on:
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
3
.github/workflows/misc_0.yml
vendored
3
.github/workflows/misc_0.yml
vendored
@ -9,6 +9,9 @@ on:
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
@ -13,10 +13,15 @@ on:
|
||||
- opentelemetry-instrumentation-google-genai
|
||||
description: 'Package to be released'
|
||||
required: true
|
||||
permissions:
|
||||
contents: read
|
||||
run-name: "[Package][${{ inputs.package }}] Prepare patch release"
|
||||
|
||||
jobs:
|
||||
prepare-patch-release:
|
||||
permissions:
|
||||
contents: write # required for pushing branches
|
||||
pull-requests: write # required for creating pull requests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
@ -14,6 +14,9 @@ on:
|
||||
description: 'Package to be released'
|
||||
required: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
run-name: "[Package][${{ inputs.package }}] Prepare release"
|
||||
jobs:
|
||||
prereqs:
|
||||
@ -92,6 +95,9 @@ jobs:
|
||||
create-pull-request-against-release-branch:
|
||||
runs-on: ubuntu-latest
|
||||
needs: prereqs
|
||||
permissions:
|
||||
contents: write # required for pushing branches
|
||||
pull-requests: write # required for creating pull requests
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@ -153,6 +159,9 @@ jobs:
|
||||
create-pull-request-against-main:
|
||||
runs-on: ubuntu-latest
|
||||
needs: prereqs
|
||||
permissions:
|
||||
contents: write # required for pushing branches
|
||||
pull-requests: write # required for creating pull requests
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
5
.github/workflows/package-release.yml
vendored
5
.github/workflows/package-release.yml
vendored
@ -13,9 +13,14 @@ on:
|
||||
- opentelemetry-instrumentation-google-genai
|
||||
description: 'Package to be released'
|
||||
required: true
|
||||
permissions:
|
||||
contents: read
|
||||
run-name: "[Package][${{ inputs.package }}] Release"
|
||||
jobs:
|
||||
release:
|
||||
permissions:
|
||||
contents: write # required for creating releases
|
||||
pull-requests: write # required for creating pull requests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: |
|
||||
|
6
.github/workflows/prepare-patch-release.yml
vendored
6
.github/workflows/prepare-patch-release.yml
vendored
@ -2,8 +2,14 @@ name: Prepare patch release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
prepare-patch-release:
|
||||
permissions:
|
||||
contents: write # required for pushing branches
|
||||
pull-requests: write # required for creating and editing pull requests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
9
.github/workflows/prepare-release-branch.yml
vendored
9
.github/workflows/prepare-release-branch.yml
vendored
@ -6,6 +6,9 @@ on:
|
||||
description: "Pre-release version number? (e.g. 1.9.0rc2)"
|
||||
required: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
prereqs:
|
||||
runs-on: ubuntu-latest
|
||||
@ -38,6 +41,9 @@ jobs:
|
||||
create-pull-request-against-release-branch:
|
||||
runs-on: ubuntu-latest
|
||||
needs: prereqs
|
||||
permissions:
|
||||
contents: write # required for pushing branches
|
||||
pull-requests: write # required for creating and editing pull requests
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@ -126,6 +132,9 @@ jobs:
|
||||
create-pull-request-against-main:
|
||||
runs-on: ubuntu-latest
|
||||
needs: prereqs
|
||||
permissions:
|
||||
contents: write # required for pushing branches
|
||||
pull-requests: write # required for creating and editing pull requests
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@ -2,8 +2,13 @@ name: Release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
release:
|
||||
permissions:
|
||||
contents: write # required for creating releases
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: |
|
||||
|
3
.github/workflows/test_0.yml
vendored
3
.github/workflows/test_0.yml
vendored
@ -9,6 +9,9 @@ on:
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
3
.github/workflows/test_1.yml
vendored
3
.github/workflows/test_1.yml
vendored
@ -9,6 +9,9 @@ on:
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
3
.github/workflows/test_2.yml
vendored
3
.github/workflows/test_2.yml
vendored
@ -9,6 +9,9 @@ on:
|
||||
- 'release/*'
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
Reference in New Issue
Block a user