Go to file
Klas Broberg a45bc4e6cb
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m14s
changed up
2025-09-15 14:05:16 +02:00
.gitea/workflows Changed it to harcoded 2025-09-15 13:52:40 +02:00
Dockerfile changed up 2025-09-15 14:05:16 +02:00
README.md Initial commit 2025-09-15 13:30:18 +02:00

Gitea .NET Runner Docker Image

This project creates a Docker image that extends the gitea/act_runner:latest base image with the latest .NET SDK installed.

Overview

The Docker image includes:

  • Base: gitea/act_runner:latest - Gitea Actions runner
  • .NET SDK 9.0 (latest) - For building and running .NET applications
  • All dependencies required for .NET development

Files

  • Dockerfile - Docker image definition
  • build.sh - Script to build the Docker image
  • push.sh - Script to push the image to your local Gitea registry
  • README.md - This documentation

Usage

Building the Image

./build.sh

This will:

  1. Build the Docker image locally as gitea-dotnet-runner:latest
  2. Tag it for your Gitea registry as git.pitan.net/klas/gitea-dotnet-runner:latest

Pushing to Gitea Registry

./push.sh

This will:

  1. Login to your Gitea registry (you'll be prompted for credentials)
  2. Push the image to git.pitan.net/klas/gitea-dotnet-runner:latest

Using the Image

Once pushed to your Gitea registry, you can use this image in your Gitea Actions workflows:

name: .NET Build
on: [push]

jobs:
  build:
    runs-on: self-hosted
    container: git.pitan.net/klas/gitea-dotnet-runner:latest
    steps:
      - uses: actions/checkout@v4
      - name: Restore dependencies
        run: dotnet restore
      - name: Build
        run: dotnet build --no-restore
      - name: Test
        run: dotnet test --no-build --verbosity normal

Configuration

The scripts use these default values:

  • Image name: gitea-dotnet-runner
  • Registry: git.pitan.net
  • Username: klas

You can modify these values in the build.sh and push.sh scripts if needed.

Requirements

  • Docker installed and running
  • Access to your Gitea registry at git.pitan.net
  • Internet connection for downloading base images and .NET SDK