GitHub Action on Label
This guide helps configure the EkLine GitHub Action to run when a specific label, named 'ekline', gets added to a pull request.
Prerequisites
- A GitHub repository with EkLine set up.
- EkLine GitHub Action configured in your repository.
Steps
- Open the
.github/workflows/ekline.yml
file in your GitHub repository. - Change the
on
section of the GitHub action to trigger onpull_request
withtypes: [labeled]
:
on:
pull_request:
types: [labeled]
- Add a new
if
condition to thejobs
section to check if the label "ekline" is present:
jobs:
test-pr-review:
if: contains(github.event.label.name, 'ekline')
- Save the changes to
ekline.yml
file. The updatedekline.yml
appears like this:
name: EkLine
on:
pull_request:
types: [labeled]
jobs:
test-pr-review:
if: contains(github.event.label.name, 'ekline')
name: runner / EkLine Reviewer (github-pr-review)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ekline-io/ekline-github-action@v6
with:
content_dir: ./src/docs
ek_token: ${{ secrets.ek_token }}
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
filter_mode: added
# ignore_rule: "EK00001,EK00004" # Optional
With these changes, EkLine GitHub Action triggers when someone adds a label named "ekline" to a pull request.
Usage
Add the "ekline" label to a specific pull request to run the EkLine GitHub Action. Upon adding the label, the action triggers and executes the configured checks.