name: Merge-up

on:
  # At 12:00 AM UTC, only on Tuesday
  schedule:
    - cron: '0 0 * * 2'
  workflow_dispatch:

permissions: {}

jobs:
  merge-up:
    name: Merge-up
    # Only run cron on the tractorcow-farm account
    if: (github.event_name == 'schedule' && github.repository_owner == 'tractorcow-farm') || (github.event_name != 'schedule')
    runs-on: ubuntu-latest
    permissions:
      contents: write
      actions: write
    steps:
      - name: Merge-up
        uses: silverstripe/gha-merge-up@v1
