Skip to content
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

Explicitly set GITHUB_TOKEN permissions for yocto workflow #830

Merged
merged 3 commits into from
Dec 2, 2024
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
17 changes: 12 additions & 5 deletions .github/workflows/genericx86-64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ on:
- master
# ESR branches glob pattern
- 20[0-9][0-9].[0-1]?[1470].x
# pull_request_target:
# branches:
# - main
# - master
pull_request_target:
branches:
- main
- master
push:
tags:
# Semver tags glob pattern (includes ESR in format v20YY.MM.PATCH)
Expand All @@ -31,10 +31,17 @@ on:
type: string
default: balena-staging.com

permissions:
id-token: write # This is required for requesting the JWT #https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services#requesting-the-access-token
actions: read # We are fetching workflow run results of a merge commit when workflow is triggered by new tag, to see if tests pass
pull-requests: write # Read is required to fetch the PR that merged, in order to get the test results. Write is required to create PR comments for workflow approvals.
packages: read
contents: read

jobs:
yocto:
name: Yocto
uses: balena-os/balena-yocto-scripts/.github/workflows/yocto-build-deploy.yml@05b373abd099d1862fdff51e96b0122940505756 # v1.27.15
uses: balena-os/balena-yocto-scripts/.github/workflows/yocto-build-deploy.yml@master
# Prevent duplicate workflow executions for pull_request (PR) and pull_request_target (PRT) events.
# Both PR and PRT will be triggered for the same pull request, whether it is internal or from a fork.
# This condition will prevent the workflow from running twice for the same pull request while
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/intel-nuc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ on:
- master
# ESR branches glob pattern
- 20[0-9][0-9].[0-1]?[1470].x
# pull_request_target:
# branches:
# - main
# - master
pull_request_target:
branches:
- main
- master
push:
tags:
# Semver tags glob pattern (includes ESR in format v20YY.MM.PATCH)
Expand All @@ -31,10 +31,17 @@ on:
type: string
default: balena-staging.com

permissions:
id-token: write # This is required for requesting the JWT #https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services#requesting-the-access-token
actions: read # We are fetching workflow run results of a merge commit when workflow is triggered by new tag, to see if tests pass
pull-requests: write # Read is required to fetch the PR that merged, in order to get the test results. Write is required to create PR comments for workflow approvals.
packages: read
contents: read

jobs:
yocto:
name: Yocto
uses: balena-os/balena-yocto-scripts/.github/workflows/yocto-build-deploy.yml@05b373abd099d1862fdff51e96b0122940505756 # v1.27.15
uses: balena-os/balena-yocto-scripts/.github/workflows/yocto-build-deploy.yml@master
# Prevent duplicate workflow executions for pull_request (PR) and pull_request_target (PRT) events.
# Both PR and PRT will be triggered for the same pull request, whether it is internal or from a fork.
# This condition will prevent the workflow from running twice for the same pull request while
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/surface-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ on:
- master
# ESR branches glob pattern
# - 20[0-9][0-9].[0-1]?[1470].x
# pull_request_target:
# branches:
# - main
# - master
pull_request_target:
branches:
- main
- master
push:
tags:
# Semver tags glob pattern (includes ESR in format v20YY.MM.PATCH)
Expand All @@ -31,10 +31,17 @@ on:
type: string
default: balena-staging.com

permissions:
id-token: write # This is required for requesting the JWT #https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services#requesting-the-access-token
actions: read # We are fetching workflow run results of a merge commit when workflow is triggered by new tag, to see if tests pass
pull-requests: write # Read is required to fetch the PR that merged, in order to get the test results. Write is required to create PR comments for workflow approvals.
packages: read
contents: read

jobs:
yocto:
name: Yocto
uses: balena-os/balena-yocto-scripts/.github/workflows/yocto-build-deploy.yml@05b373abd099d1862fdff51e96b0122940505756 # v1.27.15
uses: balena-os/balena-yocto-scripts/.github/workflows/yocto-build-deploy.yml@master
# Prevent duplicate workflow executions for pull_request (PR) and pull_request_target (PRT) events.
# Both PR and PRT will be triggered for the same pull request, whether it is internal or from a fork.
# This condition will prevent the workflow from running twice for the same pull request while
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/surface-pro-6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ on:
- master
# ESR branches glob pattern
# - 20[0-9][0-9].[0-1]?[1470].x
# pull_request_target:
# branches:
# - main
# - master
pull_request_target:
branches:
- main
- master
push:
tags:
# Semver tags glob pattern (includes ESR in format v20YY.MM.PATCH)
Expand All @@ -31,10 +31,17 @@ on:
type: string
default: balena-staging.com

permissions:
id-token: write # This is required for requesting the JWT #https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services#requesting-the-access-token
actions: read # We are fetching workflow run results of a merge commit when workflow is triggered by new tag, to see if tests pass
pull-requests: write # Read is required to fetch the PR that merged, in order to get the test results. Write is required to create PR comments for workflow approvals.
packages: read
contents: read

jobs:
yocto:
name: Yocto
uses: balena-os/balena-yocto-scripts/.github/workflows/yocto-build-deploy.yml@05b373abd099d1862fdff51e96b0122940505756 # v1.27.15
uses: balena-os/balena-yocto-scripts/.github/workflows/yocto-build-deploy.yml@master
# Prevent duplicate workflow executions for pull_request (PR) and pull_request_target (PRT) events.
# Both PR and PRT will be triggered for the same pull request, whether it is internal or from a fork.
# This condition will prevent the workflow from running twice for the same pull request while
Expand Down
Loading