Skip to content

relative-ci/agent-upload-artifact-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

RelativeCI agent upload artifact action

GitHub action that uploads bundle stats as an artifact to share with RelativeCI agent action when running during workflow_run.

The artifact will be available on the workflow page (see: actions/upload-artifact "Where does the upload go?") and will count toward your GitHub storage usage.

Warning

The action uses upload-artifact@v4+, which is not currently supported on GHES yet. If you are on GHES, you must use v1.

Learn more


To get started, follow RelativeCI Setup guide.

Example usage

# .github/workflow/node.js.yml
name: Node.js CI

on:
  push:
    branches:
      - master
  pull_request:

jobs:
  build:
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 'latest'

      # Install dependencies
      - run: npm ci
 
      # Build bundle and output webpack stats
      # Learn more how to output bundle stats https://relative-ci.com/documentation/guides/bundle-stats
      - run: npm run build -- --json webpack-stats.json
      
      # Upload relative-ci-artifact/webpack-stats.json to share with relative-ci/agent-action
      - name: Upload webpack stats artifact
        uses: relative-ci/agent-upload-artifact-action@v2
        with:
          webpackStatsFile: './webpack-stats.json

Input

webpackStatsFile

(default: ./webpack-stats.json) Relative path to the generated bundle stats file

artifactName

(default: relative-ci-artifacts) The artifact name

artifactWebpackStatsFile

(default: webpack-stats.json) The artifact bundle stats file name

retentionDays

(default: 90) actions/upload-artifact retention-days input