name: Keepalive

on:
  workflow_dispatch:
  # The 4th of every month at 10:50am UTC
  schedule:
    - cron: '50 10 4 * *'

jobs:
  keepalive:
    name: Keepalive
    # Only run cron on the silverstripe account
    if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    steps:
      - name: Keepalive
        uses: silverstripe/gha-keepalive@v1