Open dsnopek opened 1 year ago
An update: I copied the code for this action into my project, and added some console.log()
statements. It is picking the first workflow run in the loop, and it is a very old one. So, it does seem to be an issue with the order.
If anyone needs a script to workaround this issue take a look at https://github.com/firezone/firezone/pull/2665
thank's a lot. I got the very same problem with downloading artifacts, script from this PR helped me to create my own download artifact job https://github.com/firezone/firezone/pull/2665/commits/040345c13b4748b064cfb5aa0f9da995ecccdf0a
I'm using this YAML:
And getting this result:
The thing is, there are many dozens of newer runs! (Maybe even hundreds? Godot is a very active project.)
My first thought was that maybe the API is returning them in chronological order and picking the first (and hence oldest) one. So, I tried recreating the API calls I see in main.js using curl on the command-line, but it appears that the API is correctly returning them in reverse chronologic order (ie. newest first).
When I try to list the runs:
Here's just the first one (out of apparently 52,727 of them :-)):
If it would pick that one, that'd be fabulous!
Since I'm using
search_artifacts
andcheck_artifacts
, I also tried listing the artifacts for this run:And I can see an artifact with the correct name in there:
What can I do to induce it to try and download this artifact?
Looking at the code in main.js, I'm not seeing anything obviously wrong, unless the GitHub client is doing something to sort the results in chronological order (such that the oldest is first)?
Thanks!