name: Dispatch CI

on:
  # At 8:40 PM UTC, only on Sunday and Monday
  schedule:
    - cron: '40 20 * * 0,1'

permissions: {}

jobs:
  dispatch-ci:
    name: Dispatch CI
    # Only run cron on the symbiote account
    if: (github.event_name == 'schedule' && github.repository_owner == 'symbiote') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    permissions:
      contents: read
      actions: write
    steps:
      - name: Dispatch CI
        uses: silverstripe/gha-dispatch-ci@v1
