Skip to content

Monorepo packages updated

Actions
Detect packages updated in a monorepo app
v1.3
Latest
Star (2)

typescript-action status

Detect projects updated in a monorepo

If you have a monorepo with multiple projects, you can use this action to detect which projects have been updated in a pull request. This is useful for CI/CD workflows that need to run only on the projects that have been updated.

Save money by only running CI/CD workflows on the projects that have been updated.

Save time optimizing your CI/CD workflows.

Usage

Change action.yml

The action.yml defines the inputs and output for your action.

Update the action.yml with your name, description, inputs and outputs for your action.

See the documentation

Usage

This actions wait that you store all projects inside the same folder. Then you can pass the path to this folder as an input parameter.

  • src
    • project1
    • project2
    • project3

Execute the action

-id: updated-packages
 uses: vgpastor/monorepo-updated-packages@v1
  with:
    folder: PATH TO PROJECTS FOLDER

Pass the output to another action or a matrix

- name: Message with projects updated
  run: echo "Projects updated ${{ steps.updated-packages.projects }}"
- name: Run tests
  run: |
    for project in ${{ steps.updated-packages.projects }}
    do
      echo "Running tests for $project"
      cd $project
      npm install
      npm test
    done
 strategy:
    matrix:
      project: ${{ steps.updated-packages.projects }}
    steps:
        - name: Run tests
            run: |
            echo "Running tests for ${{ matrix.project }}"
            cd ${{ matrix.project }}
            npm install
            npm test

Monorepo packages updated is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Detect packages updated in a monorepo app
v1.3
Latest

Monorepo packages updated is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.