-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I need to improve the docs, with a sample repo like the following:
Folder structure:
.
├── Makefile
├── README.md
├── example-1
│ └── README.md
└── example-2
└── README.md
Example workflow:
name: Test PR
on:
pull_request:
types: [edited, opened, synchronize, reopened]
branches: [master]
jobs:
pr-changes:
runs-on: ubuntu-latest
outputs:
matrix-params: ${{ steps.matrix-builder.outputs.matrix }}
matrix-populated: ${{ steps.matrix-builder.outputs.matrix-populated }}
steps:
- name: PR Changes Matrix Builder
uses: KyleJamesWalker/pr-changes-matrix-builder@v0.0.1
id: matrix-builder
with:
inject_primary_key: project_name
extract_re: '(?P<project_name>.*)/.*'
# Only changes in folders, nothing in the root should be included
paths_include: '["**/**"]'
paths_ignore: '[".github/**"]'
test-pr:
needs: [pr-changes]
if: needs.pr-changes.outputs.matrix-populated == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
params: ${{ fromJson(needs.pr-changes.outputs.matrix-params ) }}
steps:
- uses: actions/checkout@v2
- name: Test
run: make test project_name=${{ matrix.params.project_name }}
Example Makefile:
protocol ?= unset
test:
@echo Testing protocol = ${protocol}
This will run make test protocl=xxx for each folder that has changes in it, but it will also ignore changes in the .github and root folers.
Metadata
Metadata
Assignees
Labels
No labels