Skip to content

Commit

Permalink
Merge pull request #60 from alexander-nitsche/task-reduce-github-acti…
Browse files Browse the repository at this point in the history
…on-runs

Skip GitHub Action scheduler in forks and run tests only in PR context
  • Loading branch information
vanderlee authored Apr 1, 2023
2 parents 22b5b6e + cc694c2 commit 1cb9fe9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ name: Languages
on:
# Run manually on demand.
workflow_dispatch:
# Run automatically on the first day of the month at midnight.
# Run automatically on the first day of the month at midnight. Skip running the scheduler in forks (see job condition).
schedule:
- cron: '0 0 1 * *'

jobs:
update:
name: 'Update languages'
runs-on: ubuntu-latest
if: github.event_name != 'schedule' || github.repository == 'vanderlee/phpSyllable'

permissions:
contents: write
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ name: Tests
on:
# Run manually on demand.
workflow_dispatch:
# Run automatically on every push and pull request. The runtime is only ~ 30s due to parallelization.
push:
# Avoid a double run for tagged commits.
branches:
- '*'
# Run automatically when a pull request is created and on each push to it.
# The runtime is only ~ 30s due to parallelization.
pull_request:

jobs:
Expand Down

0 comments on commit 1cb9fe9

Please sign in to comment.