upgrading to .net 9, adding arm images
This commit is contained in:
parent
197d65220a
commit
ed9fc3a8a0
.gitea/workflows
.github/workflows
DockerfileOverflow.CLI
Overflow.Test
Overflow.Web.Client
Overflow.Web
Overflow
@ -9,7 +9,7 @@ jobs:
|
|||||||
name: Build & Unit Test
|
name: Build & Unit Test
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
dotnet-version: [ '8.0.x' ]
|
dotnet-version: [ '9.0.x' ]
|
||||||
arch: ['ubuntu-latest', 'ubuntu-latest-arm']
|
arch: ['ubuntu-latest', 'ubuntu-latest-arm']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
49
.github/workflows/ci.yml
vendored
49
.github/workflows/ci.yml
vendored
@ -5,12 +5,12 @@ on: [push]
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.arch }}
|
||||||
name: Build & Unit Test
|
name: Build & Unit Test
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
matrix:
|
||||||
dotnet-version: [ '8.0.x' ]
|
dotnet-version: [ '9.0.x' ]
|
||||||
|
arch: ['ubuntu-latest', 'ubuntu-24.04-arm']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -29,8 +29,11 @@ jobs:
|
|||||||
|
|
||||||
build-Docker:
|
build-Docker:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.arch }}
|
||||||
name: Build Containers
|
name: Build Containers
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
arch: ['ubuntu-latest', 'ubuntu-24.04-arm']
|
||||||
needs: [build] # for ignoring bad builds
|
needs: [build] # for ignoring bad builds
|
||||||
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
|
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
|
||||||
|
|
||||||
@ -55,25 +58,25 @@ jobs:
|
|||||||
sarsoo/overflow:${{ github.ref_name }}
|
sarsoo/overflow:${{ github.ref_name }}
|
||||||
file: Dockerfile
|
file: Dockerfile
|
||||||
|
|
||||||
deploy:
|
# deploy:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
name: Deploy
|
# name: Deploy
|
||||||
needs: [build-Docker] # for ignoring bad builds
|
# needs: [build-Docker] # for ignoring bad builds
|
||||||
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
|
# if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
|
||||||
environment:
|
# environment:
|
||||||
name: prod
|
# name: prod
|
||||||
url: https://overflow.sarsoo.xyz
|
# url: https://overflow.sarsoo.xyz
|
||||||
steps:
|
# steps:
|
||||||
- uses: actions/checkout@v3
|
# - uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Tailscale
|
# - name: Tailscale
|
||||||
uses: tailscale/github-action@v2
|
# uses: tailscale/github-action@v2
|
||||||
with:
|
# with:
|
||||||
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
|
# oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
|
||||||
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
|
# oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
|
||||||
tags: tag:ci
|
# tags: tag:ci
|
||||||
version: 1.68.1
|
# version: 1.68.1
|
||||||
|
|
||||||
- name: Deploy
|
# - name: Deploy
|
||||||
run: ssh -o StrictHostKeyChecking=no ${{ secrets.TS_SSH }} -t "cd overflow/ && docker compose up -d --pull always"
|
# run: ssh -o StrictHostKeyChecking=no ${{ secrets.TS_SSH }} -t "cd overflow/ && docker compose up -d --pull always"
|
@ -1,4 +1,4 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS base
|
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS base
|
||||||
|
|
||||||
RUN dotnet workload install wasm-tools
|
RUN dotnet workload install wasm-tools
|
||||||
RUN apt update && apt install -y python3
|
RUN apt update && apt install -y python3
|
||||||
@ -6,7 +6,7 @@ RUN apt update && apt install -y python3
|
|||||||
COPY *.sln .
|
COPY *.sln .
|
||||||
COPY Overflow/*.csproj ./Overflow/
|
COPY Overflow/*.csproj ./Overflow/
|
||||||
COPY Overflow.Web/*.csproj ./Overflow.Web/
|
COPY Overflow.Web/*.csproj ./Overflow.Web/
|
||||||
COPY Overflow.Web.Client/*.csproj ./Overflow.Web.Clientl/
|
COPY Overflow.Web.Client/*.csproj ./Overflow.Web.Client/
|
||||||
RUN dotnet restore ./Overflow.Web/Overflow.Web.csproj
|
RUN dotnet restore ./Overflow.Web/Overflow.Web.csproj
|
||||||
|
|
||||||
COPY . ./
|
COPY . ./
|
||||||
@ -14,7 +14,7 @@ COPY . ./
|
|||||||
FROM base as publish
|
FROM base as publish
|
||||||
RUN dotnet publish Overflow.Web/Overflow.Web.csproj -c Release -o /app
|
RUN dotnet publish Overflow.Web/Overflow.Web.csproj -c Release -o /app
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=publish /app ./
|
COPY --from=publish /app ./
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="MongoDB.Driver" Version="2.29.0" />
|
<PackageReference Include="MongoDB.Driver" Version="3.2.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
|
||||||
@ -10,14 +10,14 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
|
||||||
<PackageReference Include="NUnit" Version="4.2.2" />
|
<PackageReference Include="NUnit" Version="4.3.2" />
|
||||||
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
|
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0" />
|
||||||
<PackageReference Include="NUnit.Analyzers" Version="4.3.0">
|
<PackageReference Include="NUnit.Analyzers" Version="4.6.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="coverlet.collector" Version="6.0.2">
|
<PackageReference Include="coverlet.collector" Version="6.0.4">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
|
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<RunAOTCompilation>true</RunAOTCompilation>
|
<RunAOTCompilation>true</RunAOTCompilation>
|
||||||
@ -9,9 +9,9 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.8" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.3" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.8" PrivateAssets="all" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.3" PrivateAssets="all" />
|
||||||
<PackageReference Include="Radzen.Blazor" Version="5.2.5" />
|
<PackageReference Include="Radzen.Blazor" Version="6.2.7" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.8" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.3" />
|
||||||
<PackageReference Include="MongoDB.Driver" Version="2.29.0" />
|
<PackageReference Include="MongoDB.Driver" Version="3.2.1" />
|
||||||
<PackageReference Include="NLog" Version="5.3.4" />
|
<PackageReference Include="NLog" Version="5.4.0" />
|
||||||
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.14" />
|
<PackageReference Include="NLog.Extensions.Logging" Version="5.4.0" />
|
||||||
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.14" />
|
<PackageReference Include="NLog.Web.AspNetCore" Version="5.4.0" />
|
||||||
<PackageReference Include="Quartz" Version="3.13.0" />
|
<PackageReference Include="Quartz" Version="3.14.0" />
|
||||||
<PackageReference Include="Quartz.AspNetCore" Version="3.13.0" />
|
<PackageReference Include="Quartz.AspNetCore" Version="3.14.0" />
|
||||||
<PackageReference Include="Quartz.Extensions.DependencyInjection" Version="3.13.0" />
|
<PackageReference Include="Quartz.Extensions.DependencyInjection" Version="3.14.0" />
|
||||||
<PackageReference Include="Quartz.Extensions.Hosting" Version="3.13.0" />
|
<PackageReference Include="Quartz.Extensions.Hosting" Version="3.14.0" />
|
||||||
<PackageReference Include="Radzen.Blazor" Version="5.2.5" />
|
<PackageReference Include="Radzen.Blazor" Version="6.2.7" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.3" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.3" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.3" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.3" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.3" />
|
||||||
<PackageReference Include="MongoDB.Driver" Version="2.29.0" />
|
<PackageReference Include="MongoDB.Driver" Version="3.2.1" />
|
||||||
<PackageReference Include="Quartz" Version="3.13.0" />
|
<PackageReference Include="Quartz" Version="3.14.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -13,7 +13,7 @@ public partial class SouthernWaterApi
|
|||||||
|
|
||||||
private static readonly string spillsEndpoint = "Spills/GetHistoricSpills";
|
private static readonly string spillsEndpoint = "Spills/GetHistoricSpills";
|
||||||
|
|
||||||
private string baseUrl;
|
private string baseUrl = "https://dv.southernwater.co.uk/gateway/Beachbuoy/1.0/api/v1.0/";
|
||||||
private string apiKey;
|
private string apiKey;
|
||||||
|
|
||||||
public SouthernWaterApi(HttpClient client, ILogger<SouthernWaterApi> logger)
|
public SouthernWaterApi(HttpClient client, ILogger<SouthernWaterApi> logger)
|
||||||
@ -22,7 +22,7 @@ public partial class SouthernWaterApi
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
[GeneratedRegex(@".APIURL=""(?<APIURL>.*)"".*APIGWKEY=""(?<APIKEY>.*?)"".*", RegexOptions.IgnoreCase)]
|
[GeneratedRegex(@"const APIGWKEY = '(?<APIKEY>.*?)'.*", RegexOptions.IgnoreCase)]
|
||||||
private static partial Regex ApiUrlAndKey();
|
private static partial Regex ApiUrlAndKey();
|
||||||
|
|
||||||
public async Task LoadApiUrl()
|
public async Task LoadApiUrl()
|
||||||
@ -61,14 +61,14 @@ public partial class SouthernWaterApi
|
|||||||
|
|
||||||
Match m = ApiUrlAndKey().Match(contentString);
|
Match m = ApiUrlAndKey().Match(contentString);
|
||||||
|
|
||||||
var apiUrlFound = m.Groups.TryGetValue("APIURL", out var apiUrl);
|
// var apiUrlFound = m.Groups.TryGetValue("APIURL", out var apiUrl);
|
||||||
var apiKeyFound = m.Groups.TryGetValue("APIKEY", out var apiKey);
|
var apiKeyFound = m.Groups.TryGetValue("APIKEY", out var apiKey);
|
||||||
|
|
||||||
if (apiUrlFound)
|
// if (apiUrlFound)
|
||||||
{
|
// {
|
||||||
baseUrl = apiUrl.Value;
|
// baseUrl = apiUrl.Value;
|
||||||
_logger.LogInformation("API url found [{APIUrl}]", apiUrl);
|
// _logger.LogInformation("API url found [{APIUrl}]", apiUrl);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (apiKeyFound)
|
if (apiKeyFound)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user