Artifacts and Cache
Configuration
To use artifact-related actions like actions/upload-artifact, you need to configure an artifact server path.
Configuration Options
The following options can be configured to set up local artifact and cache servers:
| Option | Description |
|---|---|
--artifact-server-addr | Defines the address to which the artifact server binds |
--artifact-server-path | Defines the path where the artifact server stores uploads and retrieves downloads from. If not specified, the artifact server will not start |
--artifact-server-port | Defines the port where the artifact server listens |
--cache-server-addr | Defines the address to which the cache server binds |
--cache-server-path | Defines the path where the cache server stores caches |
--cache-server-port | Defines the port where the cache server listens. 0 means a randomly available port |
Setting up artifact and cache servers
- Navigate to the Settings view
- Click the + button on the Options heading to add a new option
- Add the desired configuration options from the table above
- For each option, set an appropriate value
- Select the options to include them in your next run
Why is this needed?
GitHub Actions provides environment variables (ACTIONS_RUNTIME_TOKEN, ACTIONS_RUNTIME_URL, ACTIONS_CACHE_URL) that artifact actions rely on. When running locally, these are not available by default. The --artifact-server-path option configures a local artifact server to handle these operations.
Without the artifact server configuration, this workflow will fail with an error in the logs similar to:
❗ ::error::Unable to get the ACTIONS_RUNTIME_TOKEN env variableAdditional Resources
For more detailed information about configuring artifacts in act, refer to the act documentation on action artifacts.