|
All checks were successful
Build and Push Docker Image / build (push) Successful in 3m0s
|
||
|---|---|---|
| .gitea/workflows | ||
| Dockerfile | ||
| README.md | ||
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 definitionbuild.sh- Script to build the Docker imagepush.sh- Script to push the image to your local Gitea registryREADME.md- This documentation
Usage
Building the Image
./build.sh
This will:
- Build the Docker image locally as
gitea-dotnet-runner:latest - Tag it for your Gitea registry as
git.pitan.net/klas/gitea-dotnet-runner:latest
Pushing to Gitea Registry
./push.sh
This will:
- Login to your Gitea registry (you'll be prompted for credentials)
- 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