cicd resource_limit ai_generated true

Error: Unable to upload artifact. Total size exceeds the maximum allowed size of 10 GB.

ID: cicd/gha-artifact-upload-size

Also available as: JSON · Markdown
87%Fix Rate
88%Confidence
80Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
any active

Root Cause

GitHub Actions artifact upload fails because the total artifact size exceeds the 10 GB per-artifact limit (or the repository storage quota). This commonly happens with large build outputs, unfiltered directories, or accidental inclusion of node_modules or build caches.

generic

Workarounds

  1. 91% success Exclude unnecessary files and directories before uploading the artifact
    Add a step before upload-artifact that removes unneeded files: build caches, node_modules, .git directories, test fixtures, and intermediate compilation artifacts. Use the 'path' parameter to point only at the final output directory rather than a broad parent directory.
  2. 93% success Upload large outputs to external storage (S3, GCS, Azure Blob) instead of GitHub Artifacts
    Use aws-actions/configure-aws-credentials and the AWS CLI (or equivalent for GCS/Azure) to upload large build outputs to a cloud storage bucket. Pass the object URL between jobs via outputs or a small metadata artifact.
  3. 85% success Use compression with aggressive exclusion patterns and split into logical components
    Compress artifacts with 'tar -czf output.tar.gz --exclude="*.map" --exclude=".cache" --exclude="node_modules" build/' to strip source maps, caches, and dependencies. If still large, split into separate logical artifacts (e.g., binaries vs. debug symbols) each under the size limit.

Dead Ends

Common approaches that don't work:

  1. Increase the artifact size limit through repository or organization settings 99% fail

    The 10 GB per-artifact limit is a hard GitHub platform limit that cannot be changed through any settings. There is no configuration option to raise it.

  2. Split the artifact into multiple upload steps without reducing total size 60% fail

    Each individual upload-artifact call still has the 10 GB limit, and the overall repository storage quota (500 MB for free, up to 50 GB for enterprise) still applies to the sum of all artifacts. Splitting does not address the root cause of excessive artifact size.

  3. Compress the artifact directory by just adding tar without exclusions 55% fail

    If the contents are already compressed binaries, media files, or caches, tar/gzip yields minimal size reduction. Without excluding unnecessary files first, the archive will still exceed the limit.

Error Chain

Leads to:
Preceded by:
Frequently confused with: