Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

devops: merge paginated results when downloading blobs (#29013)

Yury Semikhatskya3c38bc1f96f
diff --git a/.github/actions/download-artifact/action.yml b/.github/actions/download-artifact/action.yml
index fdcb87b350..d279df5f8d 100644
--- a/.github/actions/download-artifact/action.yml
+++ b/.github/actions/download-artifact/action.yml
@@ -18,17 +18,17 @@ runs:
shell: bash
run: mkdir -p '${{ inputs.path }}/artifacts'
- name: Download artifacts
- uses: actions/github-script@v6
+ uses: actions/github-script@v7
with:
script: |
console.log(`downloading artifacts for workflow_run: ${context.payload.workflow_run.id}`);
console.log(`workflow_run: ${JSON.stringify(context.payload.workflow_run, null, 2)}`);
- const { data } = await github.rest.actions.listWorkflowRunArtifacts({
+ const allArtifacts = await github.paginate(github.rest.actions.listWorkflowRunArtifacts, {
...context.repo,
run_id: context.payload.workflow_run.id
});
- console.log('total = ', data.total_count);
- const artifacts = data.artifacts.filter(a => a.name.startsWith('${{ inputs.namePrefix }}'));
+ console.log('total = ', allArtifacts.length);
+ const artifacts = allArtifacts.filter(a => a.name.startsWith('${{ inputs.namePrefix }}'));
const fs = require('fs');
for (const artifact of artifacts) {
const result = await github.rest.actions.downloadArtifact({