Prerequisites
This action only works with Namespace GitHub Runners, if you haven’t yet migrated your workflows to Namespace runners, checkout the runner documentation first.Example
Example when running within a container
When running theupload-artifact action within a container, the necessary credentials to upload the artifact need to be forwarded:
Options
name
Name of the artifact to upload. Optional. Default isartifact.
path
A file, directory or wildcard pattern that describes what to upload. Required.if-no-files-found
The desired behavior if no files are found using the provided path. Available options:warn: Output a warning but do not fail the actionerror: Fail the action with an error messageignore: Do not output any warnings or errors, the action does not fail
warn.
retention-days
How long the artifact should be retained in days, after this the artifact will be expired and removed. Optional. Default is30 days
compression-level
The level of compression for Zlib to be applied to the artifact archive. The value can range from 0 to 9. For large files that are not easily compressed, a value of 0 is recommended for significantly faster uploads. Optional. Default is6.
overwrite
Iftrue, an artifact with a matching name will be deleted before a new one is uploaded.
If false, the action will fail if an artifact for the given name already exists. Does not fail if the artifact does not exist.
Optional. Default is false