@@ -48,21 +48,26 @@ jobs:
4848 uses : actions/github-script@v6
4949 with :
5050 script : |
51- // this doesn't restrict to a particular workflow run, but the
52- // artifacts we're looking for will only be built from a scheduled
53- // (cron) run, and not from pull requests
54- let allArtifacts =
55- await github.rest.actions.listArtifacts({
51+ // search for the latest artifact with this name in this repository
52+ // (not particularly for this workflow run; artifacts we're looking
53+ // for will only be built from a scheduled (cron) run, and not from
54+ // pull requests)
55+ let u_boot_rb1 =
56+ await github.rest.actions.listArtifactsForRepo({
5657 owner: context.repo.owner,
5758 repo: context.repo.repo,
58- });
59- // keep first artifact named u-boot-rb1-links and linux-deb-links
60- let u_boot_rb1 = allArtifacts.data.artifacts.filter((artifact) => {
61- return artifact.name == "u-boot-rb1-links"
62- })[0];
63- let linux_deb = allArtifacts.data.artifacts.filter((artifact) => {
64- return artifact.name == "linux-deb-links"
65- })[0];
59+ name: "u-boot-rb1-links",
60+ page: 0,
61+ per_page: 1,
62+ })[0];
63+ let linux_deb =
64+ await github.rest.actions.listArtifactsForRepo({
65+ owner: context.repo.owner,
66+ repo: context.repo.repo,
67+ name: "linux-deb-links",
68+ page: 0,
69+ per_page: 1,
70+ })[0];
6671 // download both in memory
6772 let linux_deb_dl =
6873 await github.rest.actions.downloadArtifact({
0 commit comments