-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit da78b90
Showing
11 changed files
with
7,138 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ko_fi: keefy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
on: [push] | ||
|
||
jobs: | ||
generate_build_matrix: | ||
runs-on: ubuntu-latest | ||
name: Generate build matrix. | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Generate Build Matrix | ||
uses: ./ | ||
id: generate_build_matrix | ||
with: | ||
repo-token: ${{ secrets.MY_GITHUB_TOKEN }} | ||
- name: Print the output | ||
run: | | ||
echo "The build matrix is ${{ steps.generate_build_matrix.outputs.build_matrix }}" | ||
echo "Build matrix empty: ${{ steps.generate_build_matrix.outputs.is_empty }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Keith Thompson | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# detected-changes-action | ||
|
||
This action generates a build matrix dynamically based on where files are changed in the diff from the default branch. | ||
|
||
## Inputs | ||
|
||
### `repo-token` | ||
|
||
The Github token used to authenticate. | ||
|
||
### `target-directory` | ||
|
||
An optional directory to listen to changes under. | ||
|
||
### `depth` | ||
|
||
How many levels deep to search for changes. | ||
|
||
## Outputs | ||
|
||
### `build_matrix` | ||
|
||
The generated build matrix. | ||
|
||
### `is_empty` | ||
|
||
Returns true if the build matrix is empty. | ||
|
||
## Example usage | ||
|
||
```yaml | ||
name: Generate Build Matrix | ||
uses: keiththompson/[email protected] | ||
id: generate_build_matrix | ||
with: | ||
repo-token: ${{ secrets.MY_GITHUB_TOKEN }} | ||
target-directory: projects | ||
depth: 3 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: 'Generate build matrix' | ||
description: 'A job that generates a build matrix based on files changed' | ||
inputs: | ||
repo-token: | ||
description: 'The github token used to authenticate' | ||
required: true | ||
depth: | ||
description: 'How many levels deep should the directories be returned' | ||
required: true | ||
default: 2 | ||
target-directory: | ||
description: 'An optional target directory to listen to changes in' | ||
required: false | ||
outputs: | ||
build_matrix: | ||
description: 'The files changed between the default branch and the sha being built' | ||
is_empty: | ||
description: 'Returns true when the build matrix is empty' | ||
runs: | ||
using: 'node12' | ||
main: 'dist/index.js' |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.