--- title: "Building a Docker Container with Gitea Actions on K3s" date: "2023-11-25" draft: 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](https://github.com/nektos/act) which allows you to run GitHub workflows locally. Gitea has soft forked it to create [act_runner](https://gitea.com/gitea/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](https://docs.gitea.com/usage/actions/quickstart) ## Building and Pushing Docker Image with GitHub Actions With GitHub Actions you can make use of thousands of actions available in [GitHub Marketplace](https://github.com/marketplace?type=actions). If you want to build a docker image on GitHub, you can just use the official docker [build-and-push](https://github.com/marketplace/actions/build-and-push-docker-images) 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