ci: Debug

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2021-07-24 15:37:54 +02:00
parent 5e85a73e42
commit 60f4945c27
No known key found for this signature in database
GPG Key ID: 228A77789D71A6E2

View File

@ -86,23 +86,25 @@ jobs:
with: with:
github-token: ${{ steps.get-app-token.outputs.token }} github-token: ${{ steps.get-app-token.outputs.token }}
script: | script: |
let result = new Map()
const wfJobs = await github.actions.listJobsForWorkflowRun({ const wfJobs = await github.actions.listJobsForWorkflowRun({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
run_id: context.payload.workflow_run.id, run_id: context.payload.workflow_run.id,
}) })
function getJobStatus(arrJobs: any[], name: string) { for (const job of wfJobs.data.jobs) {
for (const job of arrJobs) { if (job.name === 'Lint charts') {
if (job.name === name) { result.set('lint', job.conclusion)
return job.conclusion } else if (job.name === 'Install successful') {
} result.set('install', job.conclusion)
} }
} }
return { return {
lint: getJobStatus(result, 'Lint charts'), lint: result.get('lint')
install: getJobStatus(result, 'Install successful') install: result.get('install')
} }
- name: Get result - name: Get result