From 187a0b2206359bcc5dde90064731c0e0733adf0c Mon Sep 17 00:00:00 2001 From: rhysd Date: Wed, 6 Nov 2024 17:39:08 +0900 Subject: [PATCH] add `v3-node20` versions of artifact actions (#468) Note that this restores the workaround for #442. --- popular_actions.go | 20 +++++++++++++++++++ scripts/generate-popular-actions/main.go | 11 ++++++++++ .../popular_actions.json | 4 ++-- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/popular_actions.go b/popular_actions.go index fe54df1dd..e96b9429e 100644 --- a/popular_actions.go +++ b/popular_actions.go @@ -475,6 +475,16 @@ var PopularActions = map[string]*ActionMetadata{ "path": {"path", false}, }, }, + "actions/download-artifact@v3-node20": { + Name: "Download a Build Artifact", + Inputs: ActionMetadataInputs{ + "name": {"name", false}, + "path": {"path", false}, + }, + Outputs: ActionMetadataOutputs{ + "download-path": {"download-path"}, + }, + }, "actions/download-artifact@v4": { Name: "Download a Build Artifact", Inputs: ActionMetadataInputs{ @@ -700,6 +710,16 @@ var PopularActions = map[string]*ActionMetadata{ "path": {"path", true}, }, }, + "actions/upload-artifact@v3-node20": { + Name: "Upload a Build Artifact", + Inputs: ActionMetadataInputs{ + "if-no-files-found": {"if-no-files-found", false}, + "include-hidden-files": {"include-hidden-files", false}, + "name": {"name", false}, + "path": {"path", true}, + "retention-days": {"retention-days", false}, + }, + }, "actions/upload-artifact@v4": { Name: "Upload a Build Artifact", Inputs: ActionMetadataInputs{ diff --git a/scripts/generate-popular-actions/main.go b/scripts/generate-popular-actions/main.go index 4f408bf3e..437ea4901 100644 --- a/scripts/generate-popular-actions/main.go +++ b/scripts/generate-popular-actions/main.go @@ -192,6 +192,17 @@ func (g *gen) fetchRemote() (map[string]*actionlint.ActionMetadata, error) { } } + // Workaround for #442. + // https://github.com/actions/download-artifact/issues/355 + if f.spec == "actions/download-artifact@v3-node20" { + 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 } diff --git a/scripts/generate-popular-actions/popular_actions.json b/scripts/generate-popular-actions/popular_actions.json index 1d85cf3a5..fe8d293c1 100644 --- a/scripts/generate-popular-actions/popular_actions.json +++ b/scripts/generate-popular-actions/popular_actions.json @@ -99,7 +99,7 @@ }, { "slug": "actions/download-artifact", - "tags": ["v1", "v2", "v3", "v4"], + "tags": ["v1", "v2", "v3", "v3-node20", "v4"], "next": "v5" }, { @@ -149,7 +149,7 @@ }, { "slug": "actions/upload-artifact", - "tags": ["v1", "v2", "v3", "v4"], + "tags": ["v1", "v2", "v3", "v3-node20", "v4"], "next": "v5" }, {