It seems like there has been a recent change in how actions work in repos created from templates. If a repo is created from a template, it requires manual intervention to enable actions by clicking a button that shows up under the Actions tab in the repo. There does not seem to be an API endpoint for enabling them. Worse, when querying the API about workflows, it reports 0, even though there are multiple workflow ymls present in the repo. I believe this change happened within the last week, things worked fine before then.
I imagine education use of template repos is very common and such a change happening in the middle of the semester is very disruptive.
The workaround seems to be to not use a template repo but this is neither recommended nor efficient.
Is this an oversight/bug or an intentional change? If latter, are there plans to provide support within the API to flip this switch?
Ow wow, I was thinking something was wrong in my code. Suddenly things stopped working.
Indeed, I am using GitHub actions to automatically reply to Pull Requests, so students can get a solution video the moment they submit their assignments…
Thanks for this post!
@mozzadrella, any update?
I asked on Twitter too and was directed to https://github.community/t/workflow-isnt-enabled-in-repos-generated-from-template/136421. Unfortunately no resolution there either and it seems like lost of edu use cases on that thread as well.
FWIW I was able to address this by creating student repos not from a template using the ghclass package in R (https://rundel.github.io/ghclass) and the org_create_repo() function in it. We had deprecated (but thankfully not completely removed) this functionality but it’s slow and is also not the recommended way so I hope GitHub will bring this functionality back.
FYI: I contacted GitHub support and got this reply
I have been able to recreate this and this issue has been escalated to our engineering team to look at. I do not have an ETA on when/if this will be resolved, but rest assured it is in the right hands. I will follow up next week with any information.
I’ve got a reply from support:
I have confirmed with our development team that this issue has been resolved and deployed to production. You should no longer face the issue of actions being disabled on repositories created from a template repository. If are, please let us know.
To get the actions enabled on repositories created from templates the only workaround that the engineers provided was to delete and recreate the repositories.
I understand that this is not an ideal workaround, but it is the only way at this time.
So new repositories will work and you will only need to recreate the currently existing ones.