@@ -25,15 +25,52 @@ In your repository of interest:
25256 . Specify an environment variable name as ` ACCESS_TOKEN ` and paste your PAT from
26267 . Access this environment in your workfow via ` environment: API_Access ` and reference the secret via ` ${{ secrets.ACCESS_TOKEN }} `
2727
28- # Triggering the Workflow
29-
30- At cron-job.org:
31-
32- 1 . Choose an appropirate title
33- 2 . Set the dispatch URL (e.g., ` https://api.github.com/repos/stumpy-dev/automate/dispatches ` )
34- 3 . Select an execution schedule
35- 4 . Click on the "Advanced" tab
36- 5 . Add a ` Accept:application/vnd.github.v3+json ` key-value header
37- 6 . Add a ` Authorization:token <Personal_Access_Token> ` key-value header
38- 7 . Change the "Request Method" to "POST"
39- 8 . And add a ` {"event_type": "check_numba_python_compatibility"} ` Request body
28+ # Allow Manual Workflow Triggering
29+
30+ In the workflow, add:
31+
32+ ```
33+ on:
34+ workflow_dispatch:
35+ ```
36+
37+ This will allow you to manually trigger the workflow within the Actions tab of Github
38+
39+ # Schedule Cron Job within Github Actions
40+
41+ In the workflow, add:
42+
43+ ```
44+ on:
45+ # workflow_dispatch:
46+ schedule:
47+ - cron: '0 14 * * *' # 2pm UTC == 9am EST
48+ ```
49+
50+ ~~
51+ # Triggering the Workflow Externally Via Github API
52+
53+ In the workflow, specify the ` event_type ` through the ` repository_dispatch ` custom event trigger:
54+
55+ ```
56+ on:
57+ # workflow_dispatch:
58+ # schedule:
59+ # - cron: '0 14 * * *' # 2pm UTC == 9am EST
60+ repository_dispatch:
61+ types: [check_numba_python_comptability]
62+ ```
63+
64+ Then, this can be triggered through the Github API via cron-job.org:
65+
66+ 1 . Login to cron-job.org
67+ 2 . Create a new cron job
68+ 3 . Choose an appropirate title
69+ 4 . Set the dispatch URL (e.g., ` https://api.github.com/repos/stumpy-dev/automate/dispatches ` )
70+ 5 . Select an execution schedule
71+ 6 . Click on the "Advanced" tab
72+ 7 . Add a ` Accept:application/vnd.github.v3+json ` key-value header
73+ 8 . Add a ` Authorization:token <Personal_Access_Token> ` key-value header
74+ 9 . Change the "Request Method" to "POST"
75+ 10 . And add a ` {"event_type": "check_numba_python_compatibility"} ` Request body
76+ ~~
0 commit comments