adding gitea actions
This commit is contained in:
parent
9370e68a33
commit
ef67e17297
61
.gitea/workflows/ci.yml
Normal file
61
.gitea/workflows/ci.yml
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
name: ci
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Build & Unit Test
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
dotnet-version: [ '8.0.x' ]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
github-server-url: https://gitea.sheep-ghoul.ts.net
|
||||||
|
|
||||||
|
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
|
||||||
|
uses: actions/setup-dotnet@v3.0.3
|
||||||
|
with:
|
||||||
|
dotnet-version: ${{ matrix.dotnet-version }}
|
||||||
|
- name: Install WASM Workload
|
||||||
|
run: dotnet workload install wasm-tools
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: dotnet restore Overflow.sln
|
||||||
|
- name: Build
|
||||||
|
run: dotnet build --configuration Debug --no-restore Overflow.sln
|
||||||
|
- name: Test
|
||||||
|
run: dotnet test --no-restore --verbosity normal Overflow.sln
|
||||||
|
|
||||||
|
build-Docker:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Build Containers
|
||||||
|
needs: [build] # for ignoring bad builds
|
||||||
|
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
github-server-url: https://gitea.sheep-ghoul.ts.net
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: gitea.sheep-ghoul.ts.net
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build Web Container
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
tags: gitea.sheep-ghoul.ts.net/sarsoo/overflow:latest
|
||||||
|
file: Dockerfile
|
||||||
|
context: .
|
Loading…
Reference in New Issue
Block a user