GitHub Actions: trigger on template repository clone

Template repository:

Would be cool to be able to trigger an Action inside the cloned repository, right after cloning.

It can run the setup steps and preare the repository for actual use.

For example, if it was a template repository for a node project. It could then change the name in the package.json to match the target repository name automatically.


So interested on this feature too.
It could be very helpful in order to create templates ready-to-use and avoid configuration advises on template.

My proposal is a little bit different. I thing triggers is not really needed because could be accomplish by internal GitHub behaviour.

I think that could be useful a configuration file like .on_template_cloned.* , a file that will be executed on event happens. Then, remove this file and commit the result (the repository ready to use).

A more advanced solution could be create an schema (ex. JSON Schema) with replacement rules & scripts to run.


  "replacements": [
      "replace": " origin_value",
      "with": "target_value"
  "runnables": [

FYI  @moltar :

Nowadays, I’m using the following approach to accomplish that missing ‘feature’:

Correspondig to this repository template:

Waiting for this feature too.

I was expecting that using a simple action with “on: push branch: -master” will be sufficent to run the workflow…

I’ve solved it this way:


That was my repository using metasplod on windows which I used my phone which is an android. I went through termux to use. I was trying to see why my phone was acting up. I felt like someone was spyin on me so I figured they would try to clone my computer.

It really would a be very nice github action feature

+1 for this feature. Having a templating action would ease workflows