From 878826ca4dc29e795743c3ec8d114310a9e7f09f Mon Sep 17 00:00:00 2001 From: Sergey Shevchenko Date: Wed, 20 Mar 2024 07:51:52 +0200 Subject: [PATCH] ci: Test ok-to-test only on comment actions (#45) Fixes #42 --- .github/workflows/make-test-e2e.yaml | 8 ++++++-- .github/workflows/make-test.yaml | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/make-test-e2e.yaml b/.github/workflows/make-test-e2e.yaml index c739a150..93d55c2e 100644 --- a/.github/workflows/make-test-e2e.yaml +++ b/.github/workflows/make-test-e2e.yaml @@ -2,11 +2,15 @@ name: Make run tests e2e on: pull_request: - types: [labeled] + types: + - opened + - labeled + - synchronize jobs: build: - if: ${{ github.event.label.name == 'ok-to-test' }} + # Pull request has label 'ok-to-test' or the author is a member of the organization + if: contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(fromJSON('["COLLABORATOR", "MEMBER", "OWNER"]'), github.event.pull_request.author_association) runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/make-test.yaml b/.github/workflows/make-test.yaml index cd4372f1..41dffdcd 100644 --- a/.github/workflows/make-test.yaml +++ b/.github/workflows/make-test.yaml @@ -2,11 +2,15 @@ name: Make run tests on: pull_request: - types: [labeled] + types: + - opened + - labeled + - synchronize jobs: build: - if: ${{ github.event.label.name == 'ok-to-test' }} + # Pull request has label 'ok-to-test' or the author is a member of the organization + if: contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(fromJSON('["COLLABORATOR", "MEMBER", "OWNER"]'), github.event.pull_request.author_association) runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4