From 5f45c9c7a455ba40084cd76c4b60d75fb1b9d765 Mon Sep 17 00:00:00 2001
From: Aaron Fenyes <aaron.fenyes@fareycircles.ooo>
Date: Wed, 26 Mar 2025 01:14:58 -0700
Subject: [PATCH] Set up the CI image during the CI workflow

---
 .forgejo/workflows/continuous-integration.yaml | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/.forgejo/workflows/continuous-integration.yaml b/.forgejo/workflows/continuous-integration.yaml
index 762ee62..c6b1f55 100644
--- a/.forgejo/workflows/continuous-integration.yaml
+++ b/.forgejo/workflows/continuous-integration.yaml
@@ -3,11 +3,21 @@ on:
   push:
     branches: [main]
 jobs:
+  # build and tag the Docker image that the rest of the jobs will run on
+  setup-image:
+    runs-on: self-hosted
+    defaults:
+      run:
+        working-directory: tools/ci-image
+    steps:
+      - uses: https://code.forgejo.org/actions/checkout@v4
+      - run: docker build . --tag dyna3:ci
   # build the application, reporting success if there are no errors or warnings
   build:
     runs-on: docker
     container:
       image: dyna3:ci
+    needs: [setup-image]
     defaults:
       run:
         working-directory: app-proto
@@ -21,6 +31,7 @@ jobs:
     runs-on: docker
     container:
       image: dyna3:ci
+    needs: [setup-image]
     defaults:
       run:
         working-directory: app-proto
@@ -38,6 +49,7 @@ jobs:
     runs-on: docker
     container:
       image: dyna3:ci
+    needs: [setup-image]
     defaults:
       run:
         working-directory: app-proto