Skip to content

Commit d339f6e

Browse files
committed
add download-path output to actions/download-artifact@v3 for workaround of (#442)
1 parent 874bf89 commit d339f6e

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

popular_actions.go

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/generate-popular-actions/main.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,19 @@ func (g *gen) fetchRemote() (map[string]*actionlint.ActionMetadata, error) {
191191
}
192192
}
193193

194+
// Workaround for #442.
195+
// Once this issue is fixed or the `download-artifact@v3" is completely obsolete (due to unsupported runner),
196+
// remove this `if` statement and regenerate popular_actions.go.
197+
// https://github.com/actions/download-artifact/issues/355
198+
if f.spec == "actions/download-artifact@v3" {
199+
if f.meta.Outputs == nil {
200+
f.meta.Outputs = actionlint.ActionMetadataOutputs{}
201+
}
202+
f.meta.Outputs["download-path"] = &actionlint.ActionMetadataOutput{
203+
Name: "download-path",
204+
}
205+
}
206+
194207
ret[f.spec] = f.meta
195208
}
196209

testdata/ok/issue-442.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
on: push
2+
3+
jobs:
4+
test:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/download-artifact@v3
8+
id: dl
9+
- run: echo "Download path is ${{ steps.dl.outputs.download-path}}"

0 commit comments

Comments
 (0)