name: Keepalive

on:
  workflow_dispatch:
  # The 8th of every month at 5:50pm UTC
  schedule:
    - cron: '50 17 8 * *'

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
