Skip to content

flash-install-cli/flash-install-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

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

flash-install logo

⚑ Flash Install GitHub Action

Speed up your CI/CD pipeline with Flash Install, a fast npm alternative with deterministic caching

GitHub Actions License: MIT Node.js Version npm version npm downloads Maintenance

Speed: Up to 50% Faster Cache: Deterministic Cloud: Team Sharing CI/CD: Optimized

Compatible with:
npm Compatible yarn Compatible pnpm Compatible bun Compatible Monorepos Supported

Features

  • ⚑ 30-50% faster than standard npm install
  • πŸ”„ Deterministic caching for consistent builds
  • ☁️ Cloud caching support for team sharing
  • πŸ”Œ Multiple package managers support (npm, yarn, pnpm, bun)
  • πŸ› οΈ Optimized for CI/CD environments
  • πŸ“¦ GitHub Actions caching integration
  • πŸ—οΈ Monorepo support with workspace detection
  • πŸ” Fallback to npm if Flash Install encounters an error

Usage

Add Flash Install to your GitHub Actions workflow:

steps:
  - uses: actions/checkout@v3
  
  - name: Install dependencies with Flash Install
    uses: flash-install-cli/flash-install-action@v1
    with:
      # Optional parameters (shown with defaults)
      command: 'install'           # Command to run (install, restore, snapshot, clean)
      directory: '.'               # Directory to run the command in
      cache-enabled: 'true'        # Enable GitHub Actions caching
      cloud-cache: 'false'         # Enable cloud caching
      cloud-provider: 's3'         # Cloud provider (s3, azure, gcp)
      cloud-bucket: ''             # Cloud bucket name
      cloud-region: ''             # Cloud region
      cloud-prefix: 'flash-install-cache' # Cloud prefix
      package-manager: 'npm'       # Package manager to use (npm, yarn, pnpm, bun)
      concurrency: '4'             # Number of concurrent downloads

Examples

Basic Usage

- name: Install dependencies
  uses: flash-install-cli/flash-install-action@v1

With Cloud Caching (AWS S3)

- name: Install dependencies with S3 caching
  uses: flash-install-cli/flash-install-action@v1
  with:
    cloud-cache: 'true'
    cloud-provider: 's3'
    cloud-bucket: 'my-ci-cache-bucket'
    cloud-region: 'us-east-1'
  env:
    AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
    AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

Using Yarn

- name: Install dependencies with Yarn
  uses: flash-install-cli/flash-install-action@v1
  with:
    package-manager: 'yarn'

Using PNPM

- name: Install dependencies with PNPM
  uses: flash-install-cli/flash-install-action@v1
  with:
    package-manager: 'pnpm'

Using Bun

- name: Install dependencies with Bun
  uses: flash-install-cli/flash-install-action@v1
  with:
    package-manager: 'bun'

Complete Workflow Example

Here's a complete workflow example using Flash Install:

name: Build and Test

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  build:
    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v3
    
    - name: Setup Node.js
      uses: actions/setup-node@v3
      with:
        node-version: '16'
    
    - name: Install dependencies with Flash Install
      uses: flash-install-cli/flash-install-action@v1
    
    - name: Run tests
      run: npm test
    
    - name: Build
      run: npm run build

Input Parameters

Parameter Description Required Default
command Command to run (install, restore, snapshot, clean) No install
directory Directory to run the command in No .
cache-enabled Enable GitHub Actions caching No true
cloud-cache Enable cloud caching No false
cloud-provider Cloud provider (s3, azure, gcp) No s3
cloud-bucket Cloud bucket name No ''
cloud-region Cloud region No ''
cloud-prefix Cloud prefix No flash-install-cache
package-manager Package manager to use (npm, yarn, pnpm, bun) No npm
concurrency Number of concurrent downloads No 4

How It Works

  1. Setup Node.js: The action sets up Node.js v16
  2. Install Flash Install: Installs the Flash Install CLI globally
  3. Setup Cache Directory: Creates a cache directory for Flash Install
  4. Cache Dependencies: Uses GitHub Actions caching to store and retrieve the Flash Install cache
  5. Run Flash Install: Executes the Flash Install command with the specified parameters
  6. Fallback to npm: If Flash Install fails, falls back to npm for reliability

Benchmarks

Project Type npm install flash-install Improvement
Small App 45s 28s 38% faster
Medium App 1m 32s 52s 44% faster
Large Monorepo 4m 15s 2m 10s 49% faster

*Benchmarks run on GitHub-hosted runners with cold cache

Benefits

  • Faster CI/CD: Reduce your GitHub Actions workflow time
  • Cost Savings: Shorter workflow runs mean lower GitHub Actions minutes usage
  • Better Developer Experience: Faster feedback loops for your team
  • Reliable Builds: Deterministic caching ensures consistent builds
  • Team Sharing: Share caches across your team with cloud caching
  • Monorepo Support: Optimized for monorepo projects
  • Fallback Mechanism: Automatically falls back to npm if any issues occur

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository at https://github.com/flash-install-cli/flash-install-action
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Related Projects

License

MIT

Acknowledgements

  • Thanks to all the open-source projects that made this possible
  • Special thanks to all our sponsors who make this project sustainable

About

Speed up your CI/CD pipeline with Flash Install, a fast npm alternative with deterministic caching

Resources

License

Stars

Watchers

Forks

Packages

No packages published