Skip to content

Commit

Permalink
Merge pull request #220 from TheAxelander/pre-release
Browse files Browse the repository at this point in the history
Merge changes for version 1.8
  • Loading branch information
TheAxelander authored Mar 16, 2024
2 parents 3b9b779 + 4cbaf46 commit 45b76bd
Show file tree
Hide file tree
Showing 360 changed files with 128,820 additions and 91,232 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ README.md

# files
Dockerfile*
**/appsettings.Development.json*
**/*.trx
**/*.md
**/*.ps1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-image-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [ master ]

env:
DOTNET_VERSION: '7.0.103' # The .NET SDK version to use
DOTNET_VERSION: '8.0.100' # The .NET SDK version to use

jobs:
test:
Expand Down
38 changes: 33 additions & 5 deletions .github/workflows/docker-image-pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [ pre-release ]

env:
DOTNET_VERSION: '7.0.103' # The .NET SDK version to use
DOTNET_VERSION: '8.0.100' # The .NET SDK version to use

jobs:
test:
Expand All @@ -28,9 +28,9 @@ jobs:

- name: Run Core Test Cases
run: dotnet test OpenBudgeteer.Core.Test
deploy-docker:
deploy-docker-app:
runs-on: ubuntu-latest
name: Build and Push Docker Image
name: Build and Push Docker Image (App)
needs: test
if: success()
steps:
Expand All @@ -55,5 +55,33 @@ jobs:
context: .
push: true
tags: axelander/openbudgeteer:pre-release
# file: OpenBudgeteer.Blazor/Dockerfile
platforms: linux/amd64
platforms: linux/arm64,linux/amd64
deploy-docker-api:
runs-on: ubuntu-latest
name: Build and Push Docker Image (API)
needs: test
if: success()
steps:
- name: Check out repo
uses: actions/checkout@v3

- name: Docker Login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: axelander/openbudgeteer-api:pre-release
file: API.Dockerfile
platforms: linux/arm64,linux/amd64
59 changes: 59 additions & 0 deletions .github/workflows/docker-image-version-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Docker Image (Version Tag)

on:
push:
tags:
- "*"

env:
DOTNET_VERSION: '8.0.100' # The .NET SDK version to use

jobs:
test:
runs-on: ubuntu-latest
name: Run Test Cases
steps:
- name: Check out repo
uses: actions/checkout@v3

- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Install Blazor dependencies
run: dotnet restore OpenBudgeteer.Blazor

- name: Build Blazor
run: dotnet build OpenBudgeteer.Blazor --configuration Release --no-restore

- name: Run Core Test Cases
run: dotnet test OpenBudgeteer.Core.Test
deploy-docker:
runs-on: ubuntu-latest
name: Build and Push Docker Image
needs: test
if: success()
steps:
- name: Check out repo
uses: actions/checkout@v3

- name: Docker Login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: axelander/openbudgeteer:${{ github.ref_name }}
platforms: linux/arm64,linux/amd64
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
*.db-shm
*.db-wal
*.DS_Store
OpenBudgeteer.Blazor/appsettings.Development.json
OpenBudgeteer.API/appsettings.Development.json

# User-specific files
*.rsuser
Expand Down
20 changes: 20 additions & 0 deletions API.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS base
WORKDIR /api
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_RUNNING_IN_CONTAINER=true
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
RUN apk add --no-cache icu-libs icu-data-full

FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG TARGETARCH
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
WORKDIR /src
COPY . .
RUN dotnet restore -a $TARGETARCH
WORKDIR "/src/OpenBudgeteer.API"
RUN dotnet publish "OpenBudgeteer.API.csproj" --no-self-contained -c Release -a $TARGETARCH -o /api/publish

FROM base AS final
WORKDIR /api
COPY --from=build /api/publish .
ENTRYPOINT ["dotnet", "OpenBudgeteer.API.dll"]
Loading

0 comments on commit 45b76bd

Please sign in to comment.