Skip to content

Commit fd215d2

Browse files
authored
Merge pull request #39 from PHPCompatibility/feature/ghactions-dont-run-cronjobs-on-forks
GH Actions: don't run cron jobs on forks
2 parents cba7004 + e2e11d4 commit fd215d2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414

1515
jobs:
1616
xmllint:
17+
# Don't run the cron job on forks.
18+
if: ${{ github.event_name != 'schedule' || github.event.repository.fork == false }}
19+
1720
name: 'Check XML'
1821
runs-on: ubuntu-latest
1922

@@ -47,6 +50,9 @@ jobs:
4750
diff -B ./PHPCompatibilityPasswordCompat/ruleset.xml <(xmllint --format "./PHPCompatibilityPasswordCompat/ruleset.xml")
4851
4952
test:
53+
# Don't run the cron job on forks.
54+
if: ${{ github.event_name != 'schedule' || github.event.repository.fork == false }}
55+
5056
needs: xmllint
5157
runs-on: ubuntu-latest
5258

0 commit comments

Comments
 (0)