Skip to content

Commit

Permalink
workflows: filter out schedule events from forks
Browse files Browse the repository at this point in the history
The general recommendation for forks is to disable Actions from the
project settings, since most are contributionforks that don't need to
run workflows in the context of the fork.

However, there are cases where one might need to enable Actions from a
fork, e.g. for workflow development purposes. This change should
alleviate workflow runs pressure for these instances.

Signed-off-by: Nicolas Busseneau <nicolas@isovalent.com>
  • Loading branch information
nbusseneau authored and joestringer committed May 4, 2021
1 parent ea381e7 commit d15a701
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/aks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
startsWith(github.event.comment.body, 'ci-aks') ||
startsWith(github.event.comment.body, 'test-me-please')
)) ||
github.event_name == 'schedule' ||
(github.event_name == 'schedule' && github.repository == 'cilium/cilium') ||
github.event.label.name == 'ci-run/aks'
runs-on: ubuntu-latest
timeout-minutes: 35
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
startsWith(github.event.comment.body, 'ci-eks') ||
startsWith(github.event.comment.body, 'test-me-please')
)) ||
github.event_name == 'schedule' ||
(github.event_name == 'schedule' && github.repository == 'cilium/cilium') ||
github.event.label.name == 'ci-run/eks'
runs-on: ubuntu-latest
timeout-minutes: 45
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
startsWith(github.event.comment.body, 'ci-gke') ||
startsWith(github.event.comment.body, 'test-me-please')
)) ||
github.event_name == 'schedule' ||
(github.event_name == 'schedule' && github.repository == 'cilium/cilium') ||
github.event.label.name == 'ci-run/gke'
runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/multicluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
startsWith(github.event.comment.body, 'ci-multicluster') ||
startsWith(github.event.comment.body, 'test-me-please')
)) ||
github.event_name == 'schedule' ||
(github.event_name == 'schedule' && github.repository == 'cilium/cilium') ||
github.event.label.name == 'ci-run/multicluster'
runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down

0 comments on commit d15a701

Please sign in to comment.