Configure actions/upload-artifact action to upload required hidden files #163
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A breaking change was made in the 3.2.0 release of the actions/upload-artifact action (actions/upload-artifact#602), without doing a major version bump as would be done in a responsibly maintained project. The action now defaults to not uploading "hidden" files.
This project's "Check Go Dependencies" workflow uses the Licensed tool to check for incompatible dependency licenses. The dependencies license metadata cache used by Licensed is stored in a folder named
.licensed
.In order to facilitate updates, the workflow uploads the generated dependencies license metadata cache as a workflow artifact when the current cache is found to be outdated.
The
.
at the start of the.licensed
folder name causes it to now not be uploaded to the workflow artifact. In order to catch such problems, the workflow configures the actions/upload-artifact action to fail if no files were uploaded. So in addition to not uploading the artifact, the change in the "actions/upload-artifact" action's behavior also resulted in the workflow runs failing. For example:https://github.com/arduino/setup-task/actions/runs/10682280265/job/29607763024?pr=1043#step:8:8
The problem is fixed by disabling the actions/upload-artifact action's new behavior via the
include-hidden-files
input.After this change, the workflow can once more upload the dependencies license metadata cache to a workflow artifact as needed. For example:
https://github.com/arduino/setup-task/actions/runs/10688155948/job/29627399765?pr=1043#step:8:22
This is a sync from the upstream "template" in the assets repo: arduino/tooling-project-assets#513