Skip to content

jhonatanmacazana/action-nx-affected-list

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
This branch is 16 commits ahead of, 19 commits behind dkhunt27/action-nx-affected-list:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

662050a · Oct 2, 2023

History

34 Commits
Jun 7, 2023
Jan 6, 2022
Jan 6, 2022
Oct 2, 2023
Oct 2, 2023
Jan 6, 2022
Oct 26, 2022
Jan 6, 2022
Jan 6, 2022
Jan 6, 2022
Jan 6, 2022
Jan 6, 2022
Jan 6, 2022
Jan 6, 2022
Oct 2, 2023
May 18, 2023
Jan 6, 2022
May 18, 2023
May 18, 2023
Jan 6, 2022
Jan 6, 2022

Repository files navigation

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

Action outputs

The outputs for this action are:

outputs:
    affectedApps:
        description: array of affected app names
    hasAffectedApps:
        description: true/false if there are affected apps
    affectedLibs:
        description: array of affected lib names
    hasAffectedLibs:
        description: true/false if there are affected libs
    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: jhonatanmacazana/action-nx-affected-list@v2
        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

  • make new branch and make changes
  • npm run all
  • git commit/push changes
  • make PR back to main
  • wait for pipelines to finish (test will always finish with an error since this isn't a nx monorepo)
  • git checkout main
  • git pull
  • git tag v1
  • SKIP_HOOKS=true git push origin v1
  • in github, edit tag and save (this will push to marketplace)

NPM Check

npm run npm:check

Acknowledgements

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

About

Git Action to get a list of affected nx projects (apps or libs)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 94.9%
  • JavaScript 5.1%