Use actions/checkout@v3 in a container without node installed

I’m new to Gitea actions, and actions in general. So far I have exclusively worked with GitLab CI and only dabbled with GitHub actions.

I’m currently trying to set up a Rust CI pipeline using Gitea actions, but am struggling. I would like to simply use the official rust container image (Docker), but since it does not have node installed it cannot execute the actions/checkout@v3 step. Having googled a bit, it seems that GitHub actions do allow you to run the checkout action in the container (or at least people do not complain about it) which I guess is due to the fact that actions run in VMs which then launch containers and I understand that the Gitea runner does not do that.

As I see it, the solutions are either to:

  1. Run with the Rust container, but install node prior to running checkout. I don’t really like this solution, because as I start working on other projects I will have to do the same in every project. And different images may need different steps to install node.
  2. Run with the custom images from catthehacker (GitHub - catthehacker/docker_images: Docker images). This works, but then I don’t have the flexibility of running jobs in any arbitrary container image unless I build it myself.

Any help/suggestions?

Unfortunately you’ll have to build your custom image and include nodejs and rust toolset there. Then you’ll have to label your runner properly or specify jobs.<job_name>.container.image directly in your workflow file.

Alternatively, maybe you can try installing Rust tools as part of your workflow, but it will have to run everytime you trigger the workflow.

I’ve never used this action, but you can try this: Setup Rust · Actions · GitHub Marketplace · GitHub