name: Keepalive

on:
  # At 10:50 PM UTC, on day 19 of the month
  schedule:
    - cron: '50 22 19 * *'
  workflow_dispatch:

permissions: {}

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
    permissions:
      actions: write
    steps:
      - name: Keepalive
        uses: silverstripe/gha-keepalive@v1
