diff --git a/.github/workflows/trigger_scheduled_test.yml b/.github/workflows/trigger_scheduled_test.yml new file mode 100644 index 0000000..55cd1a9 --- /dev/null +++ b/.github/workflows/trigger_scheduled_test.yml @@ -0,0 +1,21 @@ +name: Trigger a scheduled test +on: + workflow_dispatch: # For occasional manual triggering e.g. for debugging + schedule: + - cron: "0 3 * * 0" # Every Sunday at 3 AM + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Trigger testing workflow + if: github.repository_owner == 'neuroinformatics-unit' # don't trigger scheduled run from forks + uses: actions/github-script@v6 + with: + script: | + github.rest.actions.createWorkflowDispatch({ + owner: context.repo.neuroinformatics-unit, + repo: context.repo.python-cookiecutter, + workflow_id: 'test.yml', + ref: 'main', + })