Actions for Forgejo Actions can have two types: NodeJS and Docker actions.
https://codeberg.org/umglurf/reuse-action is the first Docker action that I observed in the wild, and I investigated more on how it works on the runner side. Effectively it looks like this (from observation only, please correct me if I'm wrong):
- The docker container used for the Action is created and cached.
- The container is spawned and gets the volume of the existing container mounted
- The action is executed
This has a lot of advantages over the NodeJS actions:
- The dependencies do not need to be installed all the time. Since the container is cached, this is more lightweight than installing everything from scratch.
- There can be different base images for different steps in the workflow, e.g. building the frontend of an application could be done using a different base image than the backend.
- The dependency on NodeJS could be avoided: As far as I understand, there could be a checkout action that simply uses a container image that has Git and other dependencies installed (compared to the current requirement to have NodeJS available in every container image just for the checkout step)
I think it would make sense to collect more feedback on the potential of Docker actions and consider promoting them in the Forgejo Actions ecosystem, effectively working around the current limitations of the NodeJS-based Actions ecosystem. What do you think?
Actions for Forgejo Actions can have two types: NodeJS and Docker actions.
https://codeberg.org/umglurf/reuse-action is the first Docker action that I observed in the wild, and I investigated more on how it works on the runner side. Effectively it looks like this (from observation only, please correct me if I'm wrong):
* The docker container used for the Action is created and cached.
* The container is spawned and gets the volume of the existing container mounted
* The action is executed
This has a lot of advantages over the NodeJS actions:
* The dependencies do not need to be installed all the time. Since the container is cached, this is more lightweight than installing everything from scratch.
* There can be different base images for different steps in the workflow, e.g. building the frontend of an application could be done using a different base image than the backend.
* The dependency on NodeJS could be avoided: As far as I understand, there could be a checkout action that simply uses a container image that has Git and other dependencies installed (compared to the current requirement to have NodeJS available in every container image just for the checkout step)
I think it would make sense to collect more feedback on the potential of Docker actions and consider promoting them in the Forgejo Actions ecosystem, effectively working around the current limitations of the NodeJS-based Actions ecosystem. What do you think?