From a45f09167b9a8749e7307e0646280bbadd4e7101 Mon Sep 17 00:00:00 2001 From: Sujal Date: Wed, 19 Feb 2025 18:00:59 +0530 Subject: [PATCH] Update android.yml --- .github/workflows/android.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 9125d4106..bcbef52fd 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -5,6 +5,7 @@ on: [push, pull_request, workflow_dispatch] permissions: pull-requests: write contents: read + actions: read concurrency: group: build-${{ github.event.pull_request.number || github.ref }} @@ -114,9 +115,11 @@ jobs: github-token: ${{secrets.GITHUB_TOKEN}} script: | try { - if (!process.env.GITHUB_TOKEN) { - throw new Error('GITHUB_TOKEN is not set. Please configure repository secrets.'); - } + const token = process.env.GITHUB_TOKEN; + if (!token) { + throw new Error('GITHUB_TOKEN is not set. Please check workflow permissions.'); + } + const { data: { artifacts } } = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner,