From c1d163e53fedcddc8af6cd12567be457fc0a8c1d Mon Sep 17 00:00:00 2001 From: Sai Kumar Battinoju Date: Wed, 11 Dec 2024 20:11:59 +0530 Subject: [PATCH] chore: fix use github token --- .github/workflows/unit-tests-and-lint.yml | 1 + .github/workflows/update-cache-policy.yml | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests-and-lint.yml b/.github/workflows/unit-tests-and-lint.yml index deac21cae..f94bbbe76 100644 --- a/.github/workflows/unit-tests-and-lint.yml +++ b/.github/workflows/unit-tests-and-lint.yml @@ -77,3 +77,4 @@ jobs: AWS_PROD_S3_BUCKET_NAME: ${{ secrets.AWS_PROD_S3_BUCKET_NAME }} AWS_PROD_S3_SYNC_ROLE: ${{ secrets.AWS_PROD_S3_SYNC_ROLE }} PAT: ${{ secrets.PAT }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/update-cache-policy.yml b/.github/workflows/update-cache-policy.yml index 1e719ff3e..ef571c46d 100644 --- a/.github/workflows/update-cache-policy.yml +++ b/.github/workflows/update-cache-policy.yml @@ -24,6 +24,8 @@ on: required: true PAT: required: true + GITHUB_TOKEN: + required: true permissions: id-token: write # allows the JWT to be requested from GitHub's OIDC provider @@ -41,7 +43,7 @@ jobs: actor=${{ github.actor || github.triggering_actor }} response=$(curl -L \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ secrets.PAT }}" \ + -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/orgs/${{ env.ORG_NAME }}/teams/${{ env.TEAM_NAME }}/memberships/$actor)