From 85e95d7ae8aa8b2945160342cc185bfa2f2fc487 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Sun, 24 Dec 2023 09:30:33 +0000 Subject: [PATCH] Use contains() in if rule --- .github/workflows/reviewer_lottery.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reviewer_lottery.yml b/.github/workflows/reviewer_lottery.yml index c0852a801..f3c0ec7d8 100644 --- a/.github/workflows/reviewer_lottery.yml +++ b/.github/workflows/reviewer_lottery.yml @@ -6,7 +6,16 @@ on: jobs: test: runs-on: ubuntu-latest - if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'mergify[bot]' }} + 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: