In the upper right profile:
- Click on the profile picture
- Click on Settings (note that this is not the repository settings!)
- Click on < > Developer settings located at the bottom of the left hand side menu
- Click on Personal access tokens > Tokens (classic)
- Click on Generate new token > Generate new token (classic)
- Provide a description for the Note and check
public_repo
(without this checked, you will likely receive a 404 error when trying to access the Github API) - Click Generate token at the bottom of the page
- Copy the PAT and store them in a specific environment and secret for future use
In your repository of interest:
- Click on Settings (note that this is not the profile settings)
- Click on Environments on the left hand side menu
- Click New environment
- Add an appropriate environment name like
API_Access
- Near the bottom, click Add secret
- Specify an environment variable name as
ACCESS_TOKEN
and paste your PAT from - Access this environment in your workfow via
environment: API_Access
and reference the secret via${{ secrets.ACCESS_TOKEN }}
At cron-job.org:
- Choose an appropirate title
- Set the dispatch URL (e.g.,
https://api.github.com/repos/stumpy-dev/automate/dispatches
) - Select an execution schedule
- Click on the "Advanced" tab
- Add a
Accept:application/vnd.github.v3+json
key-value header - Add a
Authorization:token <Personal_Access_Token>
key-value header - Change the "Request Method" to "POST"
- And add a
{"event_type": "check_numba_python_compatibility"}
Request body