actions / upload-artifact

MIT License
3.01k stars 683 forks source link

Add if-no-files-found option to merge action #521

Open comp615 opened 4 months ago

comp615 commented 4 months ago

Fixes #520.

Why is this needed? Many matrixed workflows conditionally generate artifacts (i.e. Cypress videos or snapshots). The previous pattern in v3 was to simply upload artifact and set if-no-files-found: ignore. If there's artifacts, great...if not, no problem.

Given that the solution to accomplish the same task in v4 is to use the merge action. There should be a matching param so that in the event all the matrixed tests pass without issue, the merge job doesn't fail.

Solution This loosely mirrors the functionality from the root action: