https://github.com/xarray-contrib/ci-trigger
A github action to detect trigger keywords in the summary line of commit messages
https://github.com/xarray-contrib/ci-trigger
Last synced: 8 months ago
JSON representation
A github action to detect trigger keywords in the summary line of commit messages
- Host: GitHub
- URL: https://github.com/xarray-contrib/ci-trigger
- Owner: xarray-contrib
- License: mit
- Created: 2021-01-24T15:25:33.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-09-20T08:04:18.000Z (about 2 years ago)
- Last Synced: 2024-04-25T23:21:24.518Z (over 1 year ago)
- Language: Shell
- Size: 7.81 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ci-trigger
A github action to detect trigger keywords in the summary line of commit messages
# Usage
To use the detect-ci-trigger action in workflows, add a new job:
```yaml
detect-ci-trigger:
name: Detect CI Trigger
runs-on: ubuntu-latest
outputs:
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- uses: xarray-contrib/ci-trigger@v1
id: detect-trigger
with:
keyword: ""
```
then require the new job in jobs that should be conditionally skipped:
```yaml
my-ci-job:
runs-on: ubuntu-latest
needs: detect-ci-trigger
if: needs.detect-ci-trigger.outputs.triggered == 'false' # for skipped ci
# if: needs.detect-ci-trigger.outputs.triggered == 'true' # for explicitly enabled ci
steps:
- actions/checkout@v2
# ...
```