gitea actions
Some checks failed
ci / Build & Unit Test (8.0.x) (push) Failing after 1m33s
ci / Build MAUI (8.0.x) (push) Has been skipped
ci / Build Frontend (21) (push) Failing after 2m31s
ci / Build Containers (push) Has been skipped

This commit is contained in:
Andy Pack 2024-07-19 17:16:17 +01:00
parent 8cedd2ec1c
commit 926db39f97
Signed by: sarsoo
GPG Key ID: A55BA3536A5E0ED7

107
.gitea/workflows/ci.yml Normal file
View File

@ -0,0 +1,107 @@
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@v2
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install Dependencies
run: dotnet restore Selector.Core.sln
- name: Build
run: dotnet build --configuration Debug --no-restore Selector.Core.sln
- name: Test
run: dotnet test --no-restore --verbosity normal Selector.Core.sln
build-MAUI:
runs-on: windows-latest
name: Build MAUI
needs: [build] # for ignoring bad builds
strategy:
fail-fast: false
matrix:
dotnet-version: [ '8.0.x' ]
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Build
run: dotnet build --configuration Debug Selector.MAUI\Selector.MAUI.csproj
build-Docker:
runs-on: ubuntu-latest
name: Build Containers
needs: [build, build-Js] # for ignoring bad builds
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build CLI Container
uses: docker/build-push-action@v5
with:
push: true
tags: |
sarsoo/selector-cli:latest
sarsoo/selector-cli:${{ github.ref_name }}
file: Dockerfile.CLI
- name: Build Web Container
uses: docker/build-push-action@v5
with:
push: true
tags: |
sarsoo/selector-web:latest
sarsoo/selector-web:${{ github.ref_name }}
file: Dockerfile.Web
build-Js:
runs-on: ubuntu-latest
name: Build Frontend
strategy:
fail-fast: false
matrix:
node: [21]
steps:
- uses: actions/checkout@v2
- name: Install Node ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install Node Packages
working-directory: ./Selector.Web
run: npm ci
- name: Compile Front-end
working-directory: ./Selector.Web
run: npm run build --if-present