Monorepo packages updated
ActionsTags
(2)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.
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
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.