dkhunt27 / action-nx-affected-list

Git Action to get a list of affected nx projects (apps or libs)
MIT License
6 stars 7 forks source link

action-nx-affected-list

Github action for outputting a list of affected nx projects (apps and libs)

Action inputs

The possible inputs for this action are:

inputs:
    base:
        description: Base of the current branch (usually main)
        required: false
    head:
        description: Latest commit of the current branch (usually HEAD)
        required: false
    affectedToIgnore:
        description:  List of projects to ignore (comma separated; no spaces)
        required: false

Action outputs

The outputs for this action are:

outputs:
    affected:
        description: array of affected projects (apps/libs) names
    hasAffected:
        description: true/false if there are affected projects (apps/libs)

Usage

      - name: Check for Affected Projects
        uses: dkhunt27/action-nx-affected-list@v5
        id: checkForAffected

      - if: steps.checkForAffected.outputs.hasAffected == 'true'
        name: Build (Nx Affected)
        uses: mansagroup/nrwl-nx-action@v2
        with:
          targets: build
          affected: true
          nxCloud: false

      - if: contains(steps.checkForAffected.outputs.affected, 'someAppName')
        ### do something specific for someAppName

Making changes and pushing releases

NPM Check

yarn npm:check

Acknowledgements

Thanks to ignition-is-go which was the starting point of this code (couldn't find a published version of it)