Skip to content

caffco/changed-packages-github-action

Use this GitHub Action with your project

Add this Action to an existing workflow or create a new one.

View on Marketplace
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Maintainability Test Coverage

Changed Packages

Get information about packages with changes and packages included in your release plan.

About

This action works with the changesets versioning tool to allow you to conditionally run other actions based on whether a package has changed or it's included in a release plan.

Usage

name: Run tests if package changed
on: [push, pull_request]
jobs:
  get-changed-packages:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Get changed packages
        uses: caffco/changed-packages-github-action@v0.0.7
        with:
          base_branch: main
          repository_path: .

  run-tests:
    runs-on: ubuntu-latest
    steps:
        - name: Run package-a tests
        needs: get-changed-packages
        if: ${{contains(needs.get-changed-packages.outputs.changed_packages, 'package-a')}}
        run: yarn test-package-a

        - name: Run package-b tests
        needs: get-changed-packages
        if: ${{contains(needs.get-changed-packages.outputs.changed_packages, 'package-b')}}
        run: yarn test-package-b

About

A Github action to get the packages affected by your changesets

Resources

License

Stars

Watchers

Forks

Packages

No packages published