Skip to content

Commit 1cb9fe9

Browse files
authored
Merge pull request #60 from alexander-nitsche/task-reduce-github-action-runs
Skip GitHub Action scheduler in forks and run tests only in PR context
2 parents 22b5b6e + cc694c2 commit 1cb9fe9

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

.github/workflows/languages.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ name: Languages
33
on:
44
# Run manually on demand.
55
workflow_dispatch:
6-
# Run automatically on the first day of the month at midnight.
6+
# Run automatically on the first day of the month at midnight. Skip running the scheduler in forks (see job condition).
77
schedule:
88
- cron: '0 0 1 * *'
99

1010
jobs:
1111
update:
1212
name: 'Update languages'
1313
runs-on: ubuntu-latest
14+
if: github.event_name != 'schedule' || github.repository == 'vanderlee/phpSyllable'
1415

1516
permissions:
1617
contents: write

.github/workflows/tests.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@ name: Tests
33
on:
44
# Run manually on demand.
55
workflow_dispatch:
6-
# Run automatically on every push and pull request. The runtime is only ~ 30s due to parallelization.
7-
push:
8-
# Avoid a double run for tagged commits.
9-
branches:
10-
- '*'
6+
# Run automatically when a pull request is created and on each push to it.
7+
# The runtime is only ~ 30s due to parallelization.
118
pull_request:
129

1310
jobs:

0 commit comments

Comments
 (0)