add debug

This commit is contained in:
burnettk 2024-02-01 16:21:41 -05:00
parent d705a4146f
commit e1757afe10
No known key found for this signature in database

View File

@ -20,15 +20,15 @@ permissions:
jobs: jobs:
# uncomment this to print the context for debugging in case a job is getting skipped # uncomment this to print the context for debugging in case a job is getting skipped
# printJob: printJob:
# name: Print event name: Print event
# runs-on: ubuntu-latest runs-on: ubuntu-latest
# steps: steps:
# - name: Dump GitHub context - name: Dump GitHub context
# env: env:
# GITHUB_CONTEXT: ${{ toJson(github) }} GITHUB_CONTEXT: ${{ toJson(github) }}
# run: | run: |
# echo "$GITHUB_CONTEXT" echo "$GITHUB_CONTEXT"
dependabot: dependabot:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -44,14 +44,18 @@ jobs:
uses: actions/github-script@v6 uses: actions/github-script@v6
with: with:
script: | script: |
console.log("download artifact: started")
console.log("download artifact: content.payload: ", context.payload)
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
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,
}); });
console.log("download artifact: got allArtifacts")
let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
return artifact.name == "pr_number" return artifact.name == "pr_number"
})[0]; })[0];
console.log("download artifact: got matchArtifact: ", matchArtifact)
let download = await github.rest.actions.downloadArtifact({ let download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,