Open jsoref opened 7 months ago
actions/download-artifact@v3 is able to download the current run's artifacts while the workflow is running.
gh
can't do this (which is unfortunate).
@jsoref : Could you elaborate on how this doesn't work today? Perhaps share a simple workflow example that fails?
Comparing the logic for downloading artifacts in cli/cli
and @actions/toolkit
, it appears we are both using the same "Download an artifact" REST endpoint.
Gimme a bit, I think I have a code path that I can enable for it, although you'd probably prefer a reduced test case.
I'm not sure how much time I have today.
Welp, here's a run which I think should be sufficient evidence that it doesn't do what you expect: https://github.com/check-spelling-sandbox/upload-artifact-cli-0/actions/runs/7999515774/job/21847448953
flowchart LR;
A["✅ create-v3"] --> B["❌ retrieve-v3"]
C["✅ create-v4"] --> D["✅ retrieve-v4"]
Describe the feature or problem you’d like to solve
actions/download-artifact@v3 is able to download the current run's artifacts while the workflow is running.
gh
can't do this (which is unfortunate). actions/download-artifact@v4 is able to download the current run's artifacts while the workflow is running (withoutactions: read
).gh
can't do this (which is unfortunate).Proposed solution
Users will be able to download artifacts from the current workflow without using
uses: actions/download-artifact
which has a lousy api involving failing if an artifact isn't present and won't need to addactions: read
.Additional context
gh
has a much better interface -- composite actions can handle failures (e.g. artifact not found) without steps failing (unlike actions/download-artifact whose interface is incredibly inflexible and whose team is hostile to their user-base).