Skip to content

fix(ci): Permissions #782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/label_pr_on_title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ on:
types:
- completed

permissions:
contents: read

jobs:
get_pr_details:
permissions:
id-token: write
contents: read
id-token: write
pull-requests: read
# Guardrails to only ever run if PR recording workflow was indeed
# run in a PR event and ran successfully
if: ${{ github.event.workflow_run.conclusion == 'success' }}
Expand All @@ -27,6 +25,7 @@ jobs:
permissions:
contents: read
id-token: write
pull-requests: write
needs: get_pr_details
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/on_label_added.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ permissions:
jobs:
get_pr_details:
permissions:
contents: read
id-token: write
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/workflows/reusable_export_pr_details.yml
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/on_opened_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
get_pr_details:
permissions:
id-token: write
contents: read
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/workflows/reusable_export_pr_details.yml
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/reusable_export_pr_details.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
export_pr_details:
permissions:
id-token: write
contents: read
# see https://github.com/aws-powertools/powertools-lambda-python/issues/1349
if: inputs.workflow_origin == 'aws-powertools/powertools-lambda-dotnet'
runs-on: ubuntu-latest
Expand Down
Loading