CI/CD · cavs upload-artifact

The GitHub Action

Upload content-addressed artifacts to CAVS Hub straight from a workflow — no scripting. The Action wraps the same canonical API as the SDKs, dedups against what the Hub already stores, and exposes dedup stats as step outputs.

Usage

Drop it into any workflow.

Reference the Action by path and tag, pass the artifact fields as inputs, and provide the token as an environment secret.

.github/workflows/release.yml
- name: Upload model to CAVS
uses: orelvis15/cavs-sdks/integrations/github-action@v1
with:
path: ./output/model
project: vision-models
name: classifier
kind: model
version: ${{ github.sha }}
env:
CAVS_TOKEN: ${{ secrets.CAVS_TOKEN }}
Inputs

Configure the upload.

InputRequiredDescription
pathyesFile or directory to upload. Directories are expanded recursively; each file is streamed and hashed.
projectyesProject (an alias of repository) within the org that owns the artifact.
nameyesLogical artifact name, e.g. classifier.
kindyesArtifact kind, e.g. model, dataset, build.
versionyesVersion label for this upload, e.g. 1.4.0 or ${{ github.sha }}.
Outputs

Read back dedup stats.

The finalize step returns the created version plus deduplication metrics — reference them in later steps via steps.<id>.outputs.<name>.

OutputDescription
artifact-idServer-assigned id of the artifact.
artifact-referenceThe cavs:// reference for this version, e.g. cavs://acme-ai/vision-models/model/classifier:<sha>.
versionThe finalized version label.
sha256Content address (oid) of the artifact's top-level object.
logical-bytesTotal size of the artifact as presented.
physical-bytesBytes actually stored after dedup.
deduplicated-bytesBytes skipped because the Hub already had them.
deduplication-ratioFraction of the upload served from existing objects.
using an output in a later step
- id: upload
uses: orelvis15/cavs-sdks/integrations/github-action@v1
with:
path: ./output/model
project: vision-models
name: classifier
kind: model
version: ${{ github.sha }}
env:
CAVS_TOKEN: ${{ secrets.CAVS_TOKEN }}
- run: echo "Published ${{ steps.upload.outputs.artifact-reference }}"
Secrets & telemetry

Handled safely by default.

Secrets

Store the service-account key as the CAVS_TOKEN repository or org secret and pass it via env. The Action redacts the token from logs and never prints presigned URLs or full request headers. Set CAVS_API as an env var to target a self-hosted Hub. Use least-privilege scopes — artifacts:write is enough to publish.

Telemetry

Every request carries telemetry headers so uploads are attributable: the Action sets X-CAVS-Integration: github-actions, sends X-CAVS-Integration-Version and a User-Agent, and forwards a correlation id via X-CAVS-Run-ID. Deprecation notices arrive as X-CAVS-Deprecation and surface as workflow warnings — never as failures.

Idempotent finalize. Re-running a job with the same inputs sends a stable Idempotency-Key, so retries return the same version instead of creating duplicates.