The solution was to include the --function argument to the deployment command:
gcloud run deploy testfunc --source . --function=run_testfunc
As per the documentation, the function argument
Specifies that the deployed object is a function. If a value is provided, that value is used as the entrypoint.
in my Github Action, I added the --function argument using flags