Skip to content

Commit

Permalink
React to PRs being labeled as well
Browse files Browse the repository at this point in the history
This causes the "consuming projects" job react to a PR being labeled
with the `test-projects` label and kick off the test.

The only side effect, is that any other label applied creates a skipped
job, so the actions log might become full of them.

Signed-off-by: Mike Kolesnik <mkolesni@redhat.com>
  • Loading branch information
mkolesnik authored and tpantelis committed Jul 1, 2020
1 parent 0e4da5b commit 88b83d1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/e2e-consuming.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
on:
pull_request:
types: [labeled, opened, synchronize, reopened]

name: E2E Tests (Consuming Projects)
jobs:
e2e:
timeout-minutes: 30
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'test-projects')
if: |
( github.event.action == 'labeled' && github.event.label.name == 'test-projects' )
|| ( github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'test-projects') )
strategy:
fail-fast: false
matrix:
Expand Down

0 comments on commit 88b83d1

Please sign in to comment.