Skip to content
This repository was archived by the owner on Dec 9, 2025. It is now read-only.

A set of Github Actions for NX workspaces

License

Notifications You must be signed in to change notification settings

gearment/nx-github-actions

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

205 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NX Github Actions

GitHub Workflow Status Codecov PRs All Contributors styled with prettier commitizen MIT

A set of Github Actions for NX workspaces

project version description
@e-square/nx-affected-matrix GitHub Marketplace Uses NX's affected utils to calculate the changes. Outputs a matrix of the distributed tasks
@e-square/nx-distributed-task GitHub Marketplace Execute each distributed task from the matrix generated from nx-affected-matrix action

Features

  • ✅ Distribution of tasks across multiple parallel jobs
  • ✅ GitHub Cache support
  • ✅ GitHub artifacts support
  • ✅ NX Cloud support

Table of Contents

Usage

Here's an example of a workflow file that uses both actions

jobs:
  setup:
    runs-on: ubuntu-latest
    name: Affected Matrix
    outputs:
      hasChanges: ${{ steps.affected.outputs.hasChanges }}
      matrix: ${{ steps.affected.outputs.matrix }}
    steps:
      - name: Calculate affected projects
        uses: e-square-io/nx-affected-matrix@v2
        id: affected
        with:
          targets: 'test,build'
          maxDistribution: 3
          workingDirectory: ''
          args: ''

  execute:
    name: ${{ matrix.target }}
    if: ${{ fromJSON(needs.setup.outputs.hasChanges) }}
    needs: [setup]
    runs-on: ubuntu-latest
    continue-on-error: ${{ matrix.target == 'test' }}
    strategy:
      fail-fast: false
      matrix: ${{ fromJSON(needs.setup.outputs.matrix) }}
    steps:
      # Checkout, cache, install node modules

      - name: Execute
        uses: e-square-io/nx-distributed-task@v2
        id: execute
        with:
          target: ${{ matrix.target }}
          projects: ${{ matrix.projects }}
          uploadOutputs: true
          nxCloud: false
          args: ''

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Ron Netzer

💻 🖋 🎨 📖 🤔 🚧

Robin Pellegrims

🐛 💻

Steven Rathbauer

💻 🚧 🛡️

This project follows the all-contributors specification. Contributions of any kind welcome!

Icons made by Freepik from www.flaticon.com

About

A set of Github Actions for NX workspaces

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 95.8%
  • JavaScript 3.9%
  • Shell 0.3%