From ec4336ea4db7fb59c125986667091100445dc9d3 Mon Sep 17 00:00:00 2001 From: Ryan Cooke Date: Fri, 29 Nov 2024 16:33:24 +0000 Subject: [PATCH 1/3] Explicitly set GITHUB_TOKEN permissions for yocto workflow Changelog-entry: Explicitly set GITHUB_TOKEN permissions for yocto workflow Signed-off-by: Ryan Cooke --- .github/workflows/ucm-imx93.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ucm-imx93.yml b/.github/workflows/ucm-imx93.yml index 48d513cc..ebea7845 100644 --- a/.github/workflows/ucm-imx93.yml +++ b/.github/workflows/ucm-imx93.yml @@ -31,6 +31,12 @@ 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: From 6e6d925a212099c6b6db8a7441d23c57b6bf303f Mon Sep 17 00:00:00 2001 From: Ryan Cooke Date: Fri, 29 Nov 2024 16:35:53 +0000 Subject: [PATCH 2/3] Pin yocto-scripts workflow to master --- .github/workflows/ucm-imx93.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ucm-imx93.yml b/.github/workflows/ucm-imx93.yml index ebea7845..e4222942 100644 --- a/.github/workflows/ucm-imx93.yml +++ b/.github/workflows/ucm-imx93.yml @@ -41,7 +41,7 @@ permissions: jobs: yocto: name: Yocto - uses: balena-os/balena-yocto-scripts/.github/workflows/yocto-build-deploy.yml@ded533f1b8c8ff983dbcff2d219851130f8bfc4d # v1.27.2 + 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 From 79b7d36ac085a074fb68815ba28aaa6482b65d8b Mon Sep 17 00:00:00 2001 From: Ryan Cooke Date: Fri, 29 Nov 2024 16:36:12 +0000 Subject: [PATCH 3/3] re-enable PRT trigger --- .github/workflows/ucm-imx93.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ucm-imx93.yml b/.github/workflows/ucm-imx93.yml index e4222942..165e337c 100644 --- a/.github/workflows/ucm-imx93.yml +++ b/.github/workflows/ucm-imx93.yml @@ -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)