<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Runners on Mike Bell - Blog &amp; Stuff</title><link>https://mikebell.io/tags/runners/</link><description>Recent content in Runners on Mike Bell - Blog &amp; Stuff</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>hello@mikebell.io (Mike Bell)</managingEditor><webMaster>hello@mikebell.io (Mike Bell)</webMaster><copyright>© 2026 Mike Bell</copyright><lastBuildDate>Mon, 10 Feb 2025 20:42:52 +0000</lastBuildDate><atom:link href="https://mikebell.io/tags/runners/index.xml" rel="self" type="application/rss+xml"/><item><title>Adding custom runners to Forgejo</title><link>https://mikebell.io/posts/adding-custom-runners-forgejo/</link><pubDate>Mon, 10 Feb 2025 20:42:52 +0000</pubDate><author>hello@mikebell.io (Mike Bell)</author><guid>https://mikebell.io/posts/adding-custom-runners-forgejo/</guid><description>
&lt;p>This is one of those problems that now that I get it it really shouldn&amp;rsquo;t have been so hard. Like everything with development and homelabbing documentation is key.&lt;/p>
&lt;p>Huge thanks to:&lt;/p>
&lt;ul>
&lt;li>&lt;a
href="https://mastodon.social/@mcrmonkey"
target="_blank"
>https://mastodon.social/@mcrmonkey&lt;/a>&lt;/li>
&lt;li>&lt;a
href="https://hachyderm.io/@badnetmask"
target="_blank"
>https://hachyderm.io/@badnetmask&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>without their toots on Mastodon I wouldn&amp;rsquo;t have been able to grok and actually get things working.&lt;/p>
&lt;p>Now that I have my forgejo instance up and running I&amp;rsquo;m in the process of migrating all my github repos to my own git forge. As part of the move I needed to setup forgejos runners so that I can run actions on the many private infrastructure repos I have.&lt;/p>
&lt;p>Setting up the runners is super simple the forgejo documentation is pretty easy to understand and after following &lt;a
href="https://forgejo.org/docs/latest/admin/runner-installation/#oci-image-installation"
target="_blank"
>this&lt;/a>.&lt;/p>
&lt;p>What wasn&amp;rsquo;t clear was how to add in custom images so that I could tailor the runners how I wanted. My ultimate goal here was to have a runner that had the same functionality I was used to with Github runners. It turns out it&amp;rsquo;s really simple, if you follow the OCI installation method then you should have a file called &lt;code>.runner&lt;/code> this lives in the &lt;code>data&lt;/code> directory you defined in your &lt;code>docker-compose.yml&lt;/code>.&lt;/p>
&lt;p>Your runner file has a section called &lt;code>labels&lt;/code> this is where you add the images you want to use. See my example below:&lt;/p>
&lt;pre tabindex="0">&lt;code>{
&amp;#34;WARNING&amp;#34;: &amp;#34;This file is automatically generated by act-runner. Do not edit it manually unless you know what you are doing. Removing this file will cause act runner to re-register as a new runner.&amp;#34;,
&amp;#34;id&amp;#34;: 1,
&amp;#34;uuid&amp;#34;: &amp;#34;&amp;#34;,
&amp;#34;name&amp;#34;: &amp;#34;remotelab&amp;#34;,
&amp;#34;token&amp;#34;: &amp;#34;&amp;#34;,
&amp;#34;address&amp;#34;: &amp;#34;https://code.remotelab.uk&amp;#34;,
&amp;#34;labels&amp;#34;: [
&amp;#34;docker:docker://node:20-bullseye&amp;#34;,
&amp;#34;ubuntu-act-latest:docker://ghcr.io/catthehacker/ubuntu:act-latest&amp;#34;
]
}
&lt;/code>&lt;/pre>&lt;p>When you restart the runner you should see you have the &lt;code>ubuntu-act-latest&lt;/code> label available for your actions.&lt;/p>
&lt;p>&lt;a
href="https://github.com/catthehacker/docker_images"
target="_blank"
>caththehackers&lt;/a> images are great but they don&amp;rsquo;t have the &lt;code>aws&lt;/code> cli installed which is a hard requirement for me since I manage a lot of AWS infrastructure with terraform 100% via gitops. To fix this I quickly hacked together a docker file to add in the cli tool:&lt;/p>
&lt;pre tabindex="0">&lt;code>FROM ghcr.io/catthehacker/ubuntu:act-latest
RUN curl &amp;#34;https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip&amp;#34; -o &amp;#34;awscliv2.zip&amp;#34;
RUN unzip awscliv2.zip &amp;amp;&amp;amp; ./aws/install
&lt;/code>&lt;/pre>&lt;p>As a quick and dirty hack I pushed this up manually to forgejo (it fully supports docker images and provides a registry as well!). I can now reference that image inside my &lt;code>.runner&lt;/code> file.&lt;/p>
&lt;p>You can then reference this in your action:&lt;/p>
&lt;pre tabindex="0">&lt;code>jobs:
configure-aws:
runs-on: ubuntu-act-latest
&lt;/code>&lt;/pre>&lt;p>I still have a few things to tidy up:&lt;/p>
&lt;ol>
&lt;li>Automate building my custom image&lt;/li>
&lt;li>Migrate all repos to forgejo&lt;/li>
&lt;li>Migrate to OpenTofu&lt;/li>
&lt;/ol>
&lt;p>Thanks for reading via RSS!&lt;/p>
&lt;p>Send me a message on &lt;a href="https://remotelab.uk/mikebell">Mastodon&lt;/a> or &lt;a href="mailto:hello@mikebell.io">email me&lt;/a>&lt;/p></description></item></channel></rss>