[CI] Reviewer Lottery: Use contains() in if rule (backport #401) #228
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: Reviewer lottery | |
on: | |
pull_request_target: | |
types: [opened, ready_for_review, reopened] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: | | |
echo "$GITHUB_CONTEXT" | |
echo "The GitHub Actor's username is: $GITHUB_ACTOR" | |
reviewer-lottery: | |
runs-on: ubuntu-latest | |
if: ${{ ! contains(fromJSON('["dependabot[bot]", "mergify[bot]"]'), github.actor) }} | |
steps: | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: | | |
echo "$GITHUB_CONTEXT" | |
echo "The GitHub Actor's username is: $GITHUB_ACTOR" | |
- uses: actions/checkout@v4 | |
- uses: uesteibar/reviewer-lottery@v3 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} |