Skip to content

Commit

Permalink
feat: add auto-merge-exclude workflow input (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs authored Feb 21, 2022
1 parent 79f3bba commit aa5f3ac
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/plugins-ci-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Plugin CI - MySQL

on:
workflow_call:
inputs:
auto-merge-exclude:
description: 'A comma separated list of packages that you do not want to be auto-merged.'
required: false
default: 'fastify'
type: string

jobs:
test:
Expand Down Expand Up @@ -49,5 +55,6 @@ jobs:
steps:
- uses: fastify/github-action-merge-dependabot@v3
with:
exclude: ${{ inputs.auto-merge-exclude }}
github-token: ${{ secrets.GITHUB_TOKEN }}
target: minor
7 changes: 7 additions & 0 deletions .github/workflows/plugins-ci-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Plugin CI - PostgreSQL

on:
workflow_call:
inputs:
auto-merge-exclude:
description: 'A comma separated list of packages that you do not want to be auto-merged.'
required: false
default: 'fastify'
type: string

jobs:
test:
Expand Down Expand Up @@ -60,5 +66,6 @@ jobs:
steps:
- uses: fastify/github-action-merge-dependabot@v3
with:
exclude: ${{ inputs.auto-merge-exclude }}
github-token: ${{ secrets.GITHUB_TOKEN }}
target: minor
6 changes: 6 additions & 0 deletions .github/workflows/plugins-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: Plugin CI
on:
workflow_call:
inputs:
auto-merge-exclude:
description: 'A comma separated list of packages that you do not want to be auto-merged.'
required: false
default: 'fastify'
type: string
lint:
description: 'Set to true to run linting scripts.'
required: false
Expand Down Expand Up @@ -57,5 +62,6 @@ jobs:
steps:
- uses: fastify/github-action-merge-dependabot@v3
with:
exclude: ${{ inputs.auto-merge-exclude }}
github-token: ${{ secrets.GITHUB_TOKEN }}
target: minor
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ Included in this repo is a [basic workflow](.github/workflows/plugins-ci.yml) fo
By setting the `lint` option to `true` when using the [basic workflow](.github/workflows/plugins-ci.yml) the CI will first run the linter job once.


__Example:__ running the linter job first with the [basic workflow](.github/workflows/plugins-ci.yml)
**Example:** running the linter job first with the [basic workflow](.github/workflows/plugins-ci.yml)

```yml
name: CI
Expand All @@ -59,6 +58,13 @@ jobs:
lint: true
```

## Inputs

| Input Name | Required | Type | Default | Description |
| --------------------- | -------- | ------- | ------- | ---------------------------------------------------------------------------------- |
| `auto-merge-exclude` | false | string | `fastify` | Provide a comma separated list of packages that you do not want to be auto-merged. |
| `lint` | false | boolean | `false` | Set to `true` to run the `lint` script in a repository's `package.json`. |

## Acknowledgements

This project is kindly sponsored by:
Expand Down

0 comments on commit aa5f3ac

Please sign in to comment.