<?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>ForgeJo on Mike Bell - Blog &amp; Stuff</title><link>https://mikebell.io/categories/forgejo/</link><description>Recent content in ForgeJo 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>Sun, 12 Apr 2026 11:07:39 +0000</lastBuildDate><atom:link href="https://mikebell.io/categories/forgejo/index.xml" rel="self" type="application/rss+xml"/><item><title>Using Goreleaser with ForgeJo</title><link>https://mikebell.io/posts/goreleaser-forgejo/</link><pubDate>Sun, 12 Apr 2026 11:07:39 +0000</pubDate><author>hello@mikebell.io (Mike Bell)</author><guid>https://mikebell.io/posts/goreleaser-forgejo/</guid><description>
&lt;p>For my resound app I wanted a really nice release process (it is after all part of my job!). Resound is a cli go app built with Cobra and Viper, it takes the last RSS item and posts it to Mastodon, pretty simple. You can checkout the latest version &lt;a
href="https://code.remotelab.uk/mikebell/resound/releases"
target="_blank"
>here&lt;/a>. I&amp;rsquo;m using goreleaser to build multiple architectures and then push them to my ForgeJo instance here&amp;rsquo;s how I did it because there are a lot of moving parts you have to put together in order to get it working.&lt;/p>
&lt;h2 class="relative group">tldr;
&lt;div id="tldr" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#tldr" aria-label="Anchor">#&lt;/a>
&lt;/span>
&lt;/h2>
&lt;ul>
&lt;li>&lt;a
href="https://code.remotelab.uk/mikebell/resound/src/branch/main/.forgejo/workflows/build-package.yaml"
target="_blank"
>build-package.yaml&lt;/a>&lt;/li>
&lt;li>&lt;a
href="https://code.remotelab.uk/mikebell/resound/src/branch/main/.goreleaser.yaml"
target="_blank"
>.goreleaser.yaml&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 class="relative group">ForgeJo Action
&lt;div id="forgejo-action" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#forgejo-action" aria-label="Anchor">#&lt;/a>
&lt;/span>
&lt;/h2>
&lt;pre tabindex="0">&lt;code>- name: Run GoReleaser
uses: https://github.com/goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7
with:
# either &amp;#39;goreleaser&amp;#39; (default) or &amp;#39;goreleaser-pro&amp;#39;
distribution: goreleaser
# &amp;#39;latest&amp;#39;, &amp;#39;nightly&amp;#39;, or a semver
version: &amp;#39;~&amp;gt; v2&amp;#39;
args: release --clean
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
&lt;/code>&lt;/pre>&lt;p>Important part here is the make sure &lt;code>uses:&lt;/code> uses the FQDN of the action and that your passing in &lt;code>GITEA_TOKEN&lt;/code> from your repo secrets. I have the following token with these options scope to the repo:&lt;/p>
&lt;ul>
&lt;li>write:package&lt;/li>
&lt;li>write:repository&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>Note: this can probably be scoped even smaller.&lt;/p>&lt;/blockquote>
&lt;h2 class="relative group">.goreleaser.yaml
&lt;div id="goreleaseryaml" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#goreleaseryaml" aria-label="Anchor">#&lt;/a>
&lt;/span>
&lt;/h2>
&lt;p>You can view the full version in the tldr above but here are the important parts:&lt;/p>
&lt;pre tabindex="0">&lt;code>release:
gitea:
owner: mikebell
name: resound
footer: &amp;gt;-
&lt;/code>&lt;/pre>&lt;p>You have to set the &lt;code>owner&lt;/code> and repo &lt;code>name&lt;/code> under &lt;code>gitea&lt;/code> in &lt;code>release&lt;/code>. This tells goreleaser where to put the output.&lt;/p>
&lt;pre tabindex="0">&lt;code>gitea_urls:
api: https://code.remotelab.uk/api/v1
download: https://code.remotelab.uk
&lt;/code>&lt;/pre>&lt;p>You then have to define your ForgeJo instance, goreleaser doesn&amp;rsquo;t officially support ForgeJo but the api is compatible with gitea.&lt;/p>
&lt;pre tabindex="0">&lt;code>force_token: gitea
&lt;/code>&lt;/pre>&lt;p>I then had to force the token to gitea because goreleaser automatically tries to work out which forge your using and there&amp;rsquo;s already a &lt;code>GITHUB_TOKEN&lt;/code> passed by default.&lt;/p>
&lt;hr>
&lt;p>Once I had all this in place I can create a tag from either the ForgeJo UI or through git and my action will create the packages and upload them to a new release you can see 1.1.0 of resound &lt;a
href="https://code.remotelab.uk/mikebell/resound/releases/tag/1.1.0"
target="_blank"
>here&lt;/a>.&lt;/p>
&lt;p>Hope this helps.&lt;/p>
&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><item><title>Tuning my renovate config</title><link>https://mikebell.io/posts/2026-04-10-tuning-my-renovate-config/</link><pubDate>Fri, 10 Apr 2026 12:39:48 +0000</pubDate><author>hello@mikebell.io (Mike Bell)</author><guid>https://mikebell.io/posts/2026-04-10-tuning-my-renovate-config/</guid><description>
&lt;p>I took some time last night to finally tune my renovate setup. There were a few issues with it - none of it renovates or my tech stacks fault, just stuff I wasn&amp;rsquo;t too happy with and things that could be improved.&lt;/p>
&lt;p>If your interested in my current working config &lt;a
href="https://code.remotelab.uk/infrastructure/renovate-config"
target="_blank"
>here&lt;/a> it is.&lt;/p>
&lt;h2 class="relative group">renovate.json to default.json
&lt;div id="renovatejson-to-defaultjson" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#renovatejson-to-defaultjson" aria-label="Anchor">#&lt;/a>
&lt;/span>
&lt;/h2>
&lt;p>When I first setup up renovate I used &lt;code>renovate.json&lt;/code> as my main config, not sure why. I&amp;rsquo;ve changed it to &lt;code>default.json&lt;/code> which is recommended by the debug output in the workflow run. This also means I can have a renovate config for this specific repo, in the future I&amp;rsquo;ll be configure auto apply of patch level updates.&lt;/p>
&lt;h2 class="relative group">minimumReleaseAge
&lt;div id="minimumreleaseage" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#minimumreleaseage" aria-label="Anchor">#&lt;/a>
&lt;/span>
&lt;/h2>
&lt;p>This is a work around for the Tofu provider registers, when a new release of the AWS provider is released it takes a bit to get into the tofu registry so I&amp;rsquo;ve set this to a day to prevent broken builds.&lt;/p>
&lt;h2 class="relative group">prCreation
&lt;div id="prcreation" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#prcreation" aria-label="Anchor">#&lt;/a>
&lt;/span>
&lt;/h2>
&lt;p>This is set to &lt;code>not-pending&lt;/code> this means renovate will wait till checks have passed before creating the PR, if they don&amp;rsquo;t exist then it creates the PR after 25 (odd default) hours see next.&lt;/p>
&lt;h2 class="relative group">prNotPendingHours
&lt;div id="prnotpendinghours" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#prnotpendinghours" aria-label="Anchor">#&lt;/a>
&lt;/span>
&lt;/h2>
&lt;p>This is set to&lt;code>1&lt;/code> hour, I don&amp;rsquo;t need to wait 25 hours for the PR to be created if there are no checks, I think this is the lowest it will go.&lt;/p>
&lt;h2 class="relative group">dependencyDashboard
&lt;div id="dependencydashboard" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#dependencydashboard" aria-label="Anchor">#&lt;/a>
&lt;/span>
&lt;/h2>
&lt;p>This is set to &lt;code>true&lt;/code>. It creates an issue in each repo with the dependancy dashboard. I&amp;rsquo;m not sure I like it so will probably disable it moving forward.&lt;/p>
&lt;p>Renovate config is really powerful and I&amp;rsquo;m only just scratching the surface with it. Hopefully this gives you a bit of an idea at what it can do and how you can shape it to your own requirements.&lt;/p>
&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><item><title>Building docker image with Forgejo Actions</title><link>https://mikebell.io/posts/building-docker-image-forgejo-actions/</link><pubDate>Fri, 14 Feb 2025 20:29:52 +0000</pubDate><author>hello@mikebell.io (Mike Bell)</author><guid>https://mikebell.io/posts/building-docker-image-forgejo-actions/</guid><description>
&lt;p>aka how I nearly went crazy trying to figure out how to build docker images in Forgejo Actions.&lt;/p>
&lt;p>With the default setup from &lt;a
href="https://forgejo.org/docs/latest/admin/runner-installation/#oci-image-installation"
target="_blank"
>here&lt;/a> you can get up and running with foregjo actions &lt;em>but&lt;/em> it won&amp;rsquo;t allow you to build docker images inside your workflows.&lt;/p>
&lt;p>When I tried to build a docker image in a workflow I kept getting the following:&lt;/p>
&lt;pre tabindex="0">&lt;code>ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
::error::buildx failed with: ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
&lt;/code>&lt;/pre>&lt;p>It&amp;rsquo;s quite a common error and something that should be easy to fix but when you throw docker-in-docker in to the mix it becomes way more complex.&lt;/p>
&lt;p>To cut a long story short I found a &lt;a
href="https://code.forgejo.org/forgejo/runner/issues/153#issuecomment-5824"
target="_blank"
>comment&lt;/a> with a link to &lt;a
href="https://code.forgejo.org/forgejo/runner/src/branch/main/examples/docker-compose/compose-forgejo-and-runner.yml"
target="_blank"
>this&lt;/a> example which was confirmed to be working, after a few tweaks I came up with the docker compose below. I&amp;rsquo;ve removed the need to be running forgejo already (I have set in a separate compose) and updated the base image.&lt;/p>
&lt;pre tabindex="0">&lt;code># Copyright 2024 The Forgejo Authors.
# SPDX-License-Identifier: MIT
#
# Create a secret with:
#
# openssl rand -hex 20
#
# Replace all occurences of {SHARED_SECRET} below with the output.
#
# NOTE: a token obtained from the Forgejo web interface cannot be used
# as a shared secret.
#
# Replace {ROOT_PASSWORD} with a secure password
#
volumes:
docker_certs:
services:
docker-in-docker:
image: code.forgejo.org/oci/docker:dind
hostname: docker # Must set hostname as TLS certificates are only valid for docker or localhost
privileged: true
environment:
DOCKER_TLS_CERTDIR: /certs
DOCKER_HOST: docker-in-docker
volumes:
- docker_certs:/certs
restart: unless-stopped
runner-register:
image: code.forgejo.org/forgejo/runner:6.2.2
links:
- docker-in-docker
environment:
DOCKER_HOST: tcp://docker-in-docker:2376
volumes:
- ./data:/data
user: 0:0
command: &amp;gt;-
bash -ec &amp;#39;
while : ; do
forgejo-runner create-runner-file --connect --instance https://code.remotelab.uk --name runner --secret {SHARED_SECRET} &amp;amp;&amp;amp; break ;
sleep 1 ;
done ;
sed -i -e &amp;#34;s|\&amp;#34;labels\&amp;#34;: null|\&amp;#34;labels\&amp;#34;: [\&amp;#34;docker-cli:docker://code.forgejo.org/oci/docker:cli\&amp;#34;,\&amp;#34;node-bookworm:docker://code.forgejo.org/oci/node:20-bookworm\&amp;#34;]|&amp;#34; .runner ;
forgejo-runner generate-config &amp;gt; config.yml ;
sed -i -e &amp;#34;s| level: info| level: debug|&amp;#34; config.yml ;
sed -i -e &amp;#34;s|network: .*|network: host|&amp;#34; config.yml ;
sed -i -e &amp;#34;s|^ envs:$$| envs:\n DOCKER_HOST: tcp://docker:2376\n DOCKER_TLS_VERIFY: 1\n DOCKER_CERT_PATH: /certs/client|&amp;#34; config.yml ;
sed -i -e &amp;#34;s|^ options:| options: -v /certs/client:/certs/client|&amp;#34; config.yml ;
sed -i -e &amp;#34;s| valid_volumes: \[\]$$| valid_volumes:\n - /certs/client|&amp;#34; config.yml ;
chown -R 1000:1000 /data
&amp;#39;
runner-daemon:
image: code.forgejo.org/forgejo/runner:6.2.2
links:
- docker-in-docker
environment:
DOCKER_HOST: tcp://docker:2376
DOCKER_CERT_PATH: /certs/client
DOCKER_TLS_VERIFY: &amp;#34;1&amp;#34;
volumes:
- ./data:/data
- docker_certs:/certs
restart: &amp;#39;unless-stopped&amp;#39;
command: &amp;gt;-
bash -c &amp;#39;
while : ; do test -w .runner &amp;amp;&amp;amp; forgejo-runner --config config.yml daemon ; sleep 1 ; done
&amp;#39;
&lt;/code>&lt;/pre>&lt;p>Hopefully this helps anyone else who comes across this issue.&lt;/p>
&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><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>