Skip to content

Commit

Permalink
component-test - Get artifacts with retry
Browse files Browse the repository at this point in the history
  • Loading branch information
essobedo committed May 31, 2023
1 parent 629fadf commit 64f76e9
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/actions/component-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,19 @@ runs:
console.log(artifacts)
console.log(artifacts.data)
console.log(artifacts.data.artifacts)
artifacts = github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{ inputs.run-id }}
});
console.log("########")
console.log(artifacts)
console.log(artifacts.data)
console.log(artifacts.data.artifacts)
var message = `${{ inputs.comment-body }}
for (int i = 0; i < 30 && artifacts.data.artifacts.length == 0; i++) {
console.log("No artifacts yet, let's try again")
await setTimeout(1000);
artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{ inputs.run-id }}
});
console.log("########")
console.log(artifacts)
console.log(artifacts.data)
console.log(artifacts.data.artifacts)
}
**Result** :x: The tests failed please check the logs below:
`
Expand Down

0 comments on commit 64f76e9

Please sign in to comment.