Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing output for download-artifact@v3 #442

Closed
ak-a opened this issue Aug 22, 2024 · 14 comments
Closed

Missing output for download-artifact@v3 #442

ak-a opened this issue Aug 22, 2024 · 14 comments

Comments

@ak-a
Copy link

ak-a commented Aug 22, 2024

https://github.com/actions/download-artifact/tree/v3?tab=readme-ov-file#download-path-output

@V3 does have an download-path output as per documentation. Can we have this added to the checks please?

https://github.com/rhysd/actionlint/blob/main/popular_actions.go#L611-L631
suggestion:

	"actions/download-artifact@v3": {
		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{
			"github-token":   {"github-token", false},
			"merge-multiple": {"merge-multiple", false},
			"name":           {"name", false},
			"path":           {"path", false},
			"pattern":        {"pattern", false},
			"repository":     {"repository", false},
			"run-id":         {"run-id", false},
		},
		Outputs: ActionMetadataOutputs{
			"download-path": {"download-path"},
		},
@isaacsanders
Copy link

The output is set in the latest version of the code, it is just not declared in the action.yml

@rhysd
Copy link
Owner

rhysd commented Sep 23, 2024

This issue should be fixed by v1.7.2.

@rhysd rhysd closed this as completed Sep 23, 2024
@isaacsanders
Copy link

isaacsanders commented Sep 23, 2024 via email

@isaacsanders
Copy link

isaacsanders commented Sep 23, 2024 via email

@rhysd
Copy link
Owner

rhysd commented Sep 24, 2024

This commit: 51c772b

Notice that diff is not expanded by default and you need to click 'Load diff'.

@isaacsanders
Copy link

The action mentioned in the issue about (actions/download-artifact@v3) was not updated. The problem with that action can’t be automatically fixed, it needs a specific override.

@rhysd
Copy link
Owner

rhysd commented Sep 24, 2024

Okay let me check it later.

@rhysd
Copy link
Owner

rhysd commented Sep 24, 2024

I checked the source. actions/download-artifact@v3 doesn't define the output in its action.yml file so actionlint cannot know it. This is an issue of the action, not actionlint.

https://github.com/actions/download-artifact/blob/9bc31d5ccc31df68ecc42ccf4149144866c47d8a/action.yml

And I also confirmed that actions/download-artifact@v4 defines the output well.

https://github.com/actions/download-artifact/blob/fa0a91b85d4f404e444e00e005971372dc801d16/action.yml#L36

So the simple way to fix this issue is just upgrading your dependency from v3 to v4.

@isaacsanders
Copy link

We are on GHES, so we can not upgrade to v4. v3 doesn't specify the output, but it does exist.

@isaacsanders
Copy link

I'm going to see how difficult it would be to contribute the change upstream.

@isaacsanders
Copy link

@rhysd
Copy link
Owner

rhysd commented Sep 25, 2024

Thanks for creating the issue. Meanwhile -ignore option would be a workaround for this.

@rhysd
Copy link
Owner

rhysd commented Sep 29, 2024

I added a workaround for this issue at d339f6e. It is shipped with the latest release v1.7.3.

https://github.com/rhysd/actionlint/releases/tag/v1.7.3

@isaacsanders
Copy link

You’re fantastic. I appreciate you.

rhysd added a commit that referenced this issue Nov 2, 2024
and remove workaround for #442 because `actions/download-artifact@v3` is
no longer available due to the drop of `node16` runner.
rhysd added a commit that referenced this issue Nov 6, 2024
Note that this restores the workaround for #442.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants