shared-actions/upload-artifact/README.md
Michael Seele ed2dcca9bb
All checks were successful
validate-shared-actions / validate-shared-actions (pull_request) Successful in 56s
Aikido Security PR Check / Aikido Security Scan (pull_request) Successful in 1m7s
feat: add download-artifact and upload-artifact actions with documentation
2026-05-22 09:55:02 +00:00

37 lines
1.2 KiB
Markdown

# upload-artifact
Upload files as a Forgejo Actions artifact. Thin wrapper around `forgejo/upload-artifact` pinned to a specific commit SHA to prevent supply chain attacks.
## Inputs
| Input | Required | Default | Description |
|-------|----------|---------|-------------|
| `name` | Yes | — | Artifact name |
| `path` | Yes | — | File or directory path to upload |
| `retention-days` | No | `30` | Number of days to retain the artifact |
| `if-no-files-found` | No | `warn` | Behaviour when no files are found — `warn`, `error`, or `ignore` |
## Usage
```yaml
- uses: https://schmalz-git.git.onstackit.cloud/schmalz/shared-actions/upload-artifact@upload-artifact-v1
with:
name: my-artifact
path: dist/
```
Upload and ignore if no files exist:
```yaml
- uses: https://schmalz-git.git.onstackit.cloud/schmalz/shared-actions/upload-artifact@upload-artifact-v1
with:
name: blob-report-${{ matrix.shard-index }}
path: frontend/blob-report/
retention-days: 3
if-no-files-found: ignore
```
## Notes
- Wraps `forgejo/upload-artifact` v4 (node20), compatible with Ubuntu 22 runners.
- The underlying action is pinned to a commit SHA rather than a mutable tag to prevent supply chain attacks.