namesny-com/content/blog/gitea_actions_k3s_docker.md

1.8 KiB

title date draft
Building a Docker Container with Gitea Actions on K3s 2023-11-25 true

Building a docker image and pushing it to registry with GitHub Actions is incredibily easy. Since Gitea Actions are compatible with GitHub Actions this should be easy, right?

Gitea Actions

Gitea Actions is a CI/CD solution tightly coupled with Gitea. They are available since Gitea 1.19 and are designed to be mostly compatible with GitHub Actions. They are based on the act which allows you to run GitHub workflows locally. Gitea has soft forked it to create act_runner.

To use Gitea Actions on you instance, you need to fist allow them in app.ini. Then create a token and deploy the runner. Once the runner is deployed and registered you will also need to enable Actions for each repository separately. For a full guide on setting up Actions check the official Gitea docs

Building and Pushing Docker Image with GitHub Actions

With GitHub Actions you can make use of thousands of actions available in GitHub Marketplace. If you want to build a docker image on GitHub, you can just use the official docker build-and-push action. Just copy one of the examples and you are good to go.

Building with Gitea

Deploying example dind-rootless

Testing with the same workflow as on github

secrets

docker command not found -> switch container to callthehacker

/var/run/docker.sock -> is docker daemon running? -> Changing the DOCKER_HOST variable

cant mount sys fs permission denied -> run docker commands directly

side step with buildah