Update android.yml

This commit is contained in:
Sujal 2025-02-19 18:00:59 +05:30 committed by GitHub
parent b2302020e4
commit a45f09167b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,6 +5,7 @@ on: [push, pull_request, workflow_dispatch]
permissions: permissions:
pull-requests: write pull-requests: write
contents: read contents: read
actions: read
concurrency: concurrency:
group: build-${{ github.event.pull_request.number || github.ref }} group: build-${{ github.event.pull_request.number || github.ref }}
@ -114,10 +115,12 @@ jobs:
github-token: ${{secrets.GITHUB_TOKEN}} github-token: ${{secrets.GITHUB_TOKEN}}
script: | script: |
try { try {
if (!process.env.GITHUB_TOKEN) { const token = process.env.GITHUB_TOKEN;
throw new Error('GITHUB_TOKEN is not set. Please configure repository secrets.'); if (!token) {
throw new Error('GITHUB_TOKEN is not set. Please check workflow permissions.');
} }
const { data: { artifacts } } = await github.rest.actions.listWorkflowRunArtifacts({ const { data: { artifacts } } = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,