test(modules): implement first tests of this repo #2
Workflow file for this run
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
name: Check Pull Request Labels | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
check_labels: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Check labels | |
run: | | |
labels=$(jq -r '.pull_request.labels[].name' "$GITHUB_EVENT_PATH") | |
if [[ ! $labels =~ (^|\s)(testing-allowed|testing-ci-not-necessary)(\s|$) ]]; then | |
echo "ERROR: Pull request must have either 'testing-allowed' or 'testing-ci-not-necessary' label. Then push a new dummy commit." | |
exit 1 | |
fi |