name: Chaos Monkey

on:
  schedule:
    - cron: '0 3 * * *'
  workflow_dispatch:

jobs:
  chaos-monkey-backend:
    name: Chaos Monkey (backend)
    runs-on: ubuntu-latest
    timeout-minutes: 60
    steps:
      - uses: actions/checkout@v4
      - name: Setup Dagger Remote Engine
        env:
          SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
        run: scripts/setup_dagger_remote.sh
      - name: Run backend chaos monkey
        run: task chaos-monkey-backend
