diff --git a/.github/workflows/grupp7.yml b/.github/workflows/grupp7.yml index e7d553d..ff1fd3d 100644 --- a/.github/workflows/grupp7.yml +++ b/.github/workflows/grupp7.yml @@ -3,9 +3,9 @@ name: Run unit test on merge publish Docker image on: - pull_request: + push: branches: - - '*' + - axelsbranch jobs: build: diff --git a/Dockerfile b/Dockerfile index 1d1a0df..257deb3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,26 @@ # Använd ett .NET Core SDK-baserat image för att bygga och testa -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env -WORKDIR /app +#FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env +#WORKDIR /app # Kopiera allt från projektet till arbetskatalogen -COPY . . +# COPY . . # Bygg applikationen -RUN dotnet build -c Release +# RUN dotnet build -c Release # Kör xUnit-tester -RUN dotnet test +# RUN dotnet test # Ange arbetskatalogen för att köra applikationen -WORKDIR /app/bin/Release/net8.0 +# WORKDIR /app/bin/Release/net8.0 # Ange entrypoint för att köra applikationen -CMD ["dotnet", "gruppuppgiftCI_CD.dll"] +# CMD ["dotnet", "gruppuppgiftCI_CD.dll"] + +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env + +WORKDIR /app + +COPY ./bin/Debug/net8.0/ . +CMD ["dotnet", "gruppuppgiftCI_CD.dll"] \ No newline at end of file diff --git a/Personummer.cs b/Personummer.cs index 4be5bb7..8f9d23d 100644 --- a/Personummer.cs +++ b/Personummer.cs @@ -33,6 +33,7 @@ public static bool Validera(string personnummer) } } + // Ytterligare kontroller för personnummer kan läggas till här. return true;