No description
- JavaScript 91.4%
- Shell 5.8%
- Makefile 2.8%
Port of actions/download-artifact for Forgejo runners with no GitHub artifact API. node20 action run from source (zero npm deps) that fetches named artifacts from S3-compatible or filesystem storage written by upload-artifact-action, reusing cache-action's storage layer. - Same with: surface as download-artifact@v4 (name, path, pattern, merge-multiple, run-id, repository) plus download-path output. - Download by name, all-for-run into per-name dirs, name patterns, merge-multiple, and cross-run / cross-repo via the metadata sidecar. - Offline test suite and a Forgejo e2e workflow; README, migration, examples. |
||
|---|---|---|
| .forgejo | ||
| .githooks | ||
| examples/workflows | ||
| scripts | ||
| src | ||
| tests | ||
| .editorconfig | ||
| .gitignore | ||
| action.yml | ||
| CHANGELOG.md | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| Makefile | ||
| MIGRATION.md | ||
| package.json | ||
| README.md | ||
| SECURITY.md | ||
download-artifact-action
Download named build artifacts on Forgejo Actions runners from storage you control (S3-compatible or a directory), with no dependency on the GitHub artifact API or github.com. A drop-in port of actions/download-artifact.
Reads what rasterstate/upload-artifact-action writes. Same backend env (RASTER_ARTIFACTS_*).
Quick start
jobs:
deploy:
needs: build
runs-on: [self-hosted, Linux]
env:
RASTER_ARTIFACTS_S3_BUCKET: ci-artifacts
RASTER_ARTIFACTS_S3_ENDPOINT: https://fsn1.your-objectstorage.com
RASTER_ARTIFACTS_S3_REGION: fsn1
RASTER_ARTIFACTS_S3_ACCESS_KEY_ID: ${{ secrets.ARTIFACTS_KEY_ID }}
RASTER_ARTIFACTS_S3_SECRET_ACCESS_KEY: ${{ secrets.ARTIFACTS_SECRET }}
steps:
- uses: https://rasterhub.com/rasterstate/download-artifact-action@v1
with:
name: dist
path: build
- run: ./deploy.sh build
Download every artifact for the run (one subdirectory per name):
- uses: https://rasterhub.com/rasterstate/download-artifact-action@v1
with:
path: artifacts
Inputs
Mirror actions/download-artifact@v4.
| Input | Required | Default | Description |
|---|---|---|---|
name |
no | Artifact to download. If omitted, all artifacts for the run. | |
path |
no | workspace | Destination directory. |
pattern |
no | Glob over artifact names when downloading multiple. | |
merge-multiple |
no | false |
Extract all into path instead of per-name subdirectories. |
run-id |
no | current run | Download from another workflow run. |
repository |
no | current repo | Download from another repository (needs backend access to that scope). |
Outputs
| Output | Description |
|---|---|
download-path |
Absolute path where artifacts were extracted. |
Behavior
- A named download extracts directly into
path. - Downloading all artifacts extracts each into
path/<name>(or all intopathwithmerge-multiple). - A named artifact that is not found is a hard error. A
patternthat matches nothing is a warning. - The action reads the JSON metadata sidecar written on upload to find each artifact's object and compression method, so a runner without
zstdcan still tell when an archive needs it.
Backend configuration
Identical to the upload action: RASTER_ARTIFACTS_* (or AWS_* for credentials). See the upload action README for the full table. Point both at the same bucket and prefix.
Examples
See examples/workflows: consume in a dependent job, download all, matrix, and cross-run.
Migrating from actions/download-artifact
See MIGRATION.md.
License
MIT. See LICENSE.