DotnetGiteaRunner/README.md
Klas Broberg 4123ec4ef3
Some checks failed
Build and Push Docker Image / build (push) Failing after 1m55s
Initial commit
2025-09-15 13:30:18 +02:00

77 lines
1.8 KiB
Markdown

# 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
```bash
./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
```bash
./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:
```yaml
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