Skip to content

Commit

Permalink
add download-path output to actions/download-artifact@v3 for work…
Browse files Browse the repository at this point in the history
…around of (#442)
  • Loading branch information
rhysd committed Sep 29, 2024
1 parent 874bf89 commit d339f6e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions popular_actions.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions scripts/generate-popular-actions/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,19 @@ func (g *gen) fetchRemote() (map[string]*actionlint.ActionMetadata, error) {
}
}

// Workaround for #442.
// Once this issue is fixed or the `download-artifact@v3" is completely obsolete (due to unsupported runner),
// remove this `if` statement and regenerate popular_actions.go.
// https://github.com/actions/download-artifact/issues/355
if f.spec == "actions/download-artifact@v3" {
if f.meta.Outputs == nil {
f.meta.Outputs = actionlint.ActionMetadataOutputs{}
}
f.meta.Outputs["download-path"] = &actionlint.ActionMetadataOutput{
Name: "download-path",
}
}

ret[f.spec] = f.meta
}

Expand Down
9 changes: 9 additions & 0 deletions testdata/ok/issue-442.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
on: push

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
id: dl
- run: echo "Download path is ${{ steps.dl.outputs.download-path}}"

0 comments on commit d339f6e

Please sign in to comment.