diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b28d402..91ccfa8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,6 +28,8 @@ jobs: build: runs-on: ubuntu-latest needs: setup + # if services is empty, the build job is skipped + if: "join(fromJSON(needs.setup.outputs.services), '') != ''" strategy: matrix: service: ${{fromJSON(needs.setup.outputs.services)}} diff --git a/README.md b/README.md index 1cb2397..1b12e01 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # example-github-actions-dynamic-matrix +[![Build Status](https://github.com/suzuki-shunsuke/example-github-actions-dynamic-matrix/workflows/test/badge.svg)](https://github.com/suzuki-shunsuke/example-github-actions-dynamic-matrix/actions) +[![GitHub last commit](https://img.shields.io/github/last-commit/suzuki-shunsuke/example-github-actions-dynamic-matrix.svg)](https://github.com/suzuki-shunsuke/example-github-actions-dynamic-matrix) +[![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/suzuki-shunsuke/example-github-actions-dynamic-matrix/master/LICENSE) + Example of GitHub Actions Workflow which runs a matrix build dynamically according to changed files in the pull request and pull request labels. This is useful in case of Monorepo.