This action check if given labels have be applied to the PR when pushed.
Required The repository token, i.e. secrets.GITHUB_TOKEN
Required The array of label name, e.g. '["label-1", "label-2"]'
The result if given labels have be applied to the PR
uses: shioyang/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
labels: '["label-1", "label-2"]'
e.g. .github/workflows/main.yml
on:
push:
branches:
- master
jobs:
check_pr_labels_job:
runs-on: ubuntu-latest
name: A job to check the PR labels contain given labels
steps:
- name: Check PR labels action step
id: check_pr_labels
uses: shioyang/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
labels: '["enhancement"]'
- name: See result
run: echo "${{ steps.check_pr_labels.outputs.result }}"