Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nitive/get-changed-files

GitHub Actions to get changes files
https://github.com/nitive/get-changed-files

Last synced: 7 days ago
JSON representation

GitHub Actions to get changes files

Awesome Lists containing this project

README

        

get-changed-files status
get-changed-files status

# get-changed-files action

A GitHub action to get changed in PR or after push actions. It should be used to create build matrix in monorepos to run tests on changed files only.

## Example

```yaml
jobs:
produce-packages-matrix:
runs-on: ubuntu-latest
outputs:
files: ${{ steps.produce-matrix.outputs.files }}
empty: ${{ steps.produce-matrix.outputs.empty }}
steps:
- uses: actions/checkout@v4

- name: Produce packages matrix from folder structure
id: produce-matrix
uses: Nitive/get-changed-files@v2
with:
files: |
packages/*/

package-lint:
needs: produce-packages-matrix
if: ${{ needs.produce-packages-matrix.outputs.empty == 'false' }}
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJson(needs.produce-packages-matrix.outputs.files) }}
steps:
- uses: actions/checkout@v4

- name: Lint package
id: working-directory
run: make lint
working-directory: ${{ matrix.package }}
```