Skip to content

feat: Add optional SQLite persistence #34

feat: Add optional SQLite persistence

feat: Add optional SQLite persistence #34

Workflow file for this run

name: main
on:
push:
branches:
- main
pull_request:
release:
types: [created]
jobs:
docs-build:
name: Docs build
runs-on: ubuntu-24.04
defaults:
run:
working-directory: ./DevOidcToolkit.Documentation
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- run: pip install -r requirements.txt
- run: mkdocs build
- name: Store docs artifact
uses: actions/upload-artifact@v4
with:
name: docs
path: DevOidcToolkit.Documentation/build/
retention-days: 1
backend-checks:
name: Backend checks
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- run: dotnet format -v d && git diff --exit-code
- run: dotnet test
binary-build-linux-x64:
name: Binary build linux-x64
needs: [backend-checks, docs-build]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Download docs
uses: actions/download-artifact@v4
with:
name: docs
path: DevOidcToolkit/Documentation
- run: dotnet publish DevOidcToolkit -c Release -r linux-x64 /p:PublishDir=dist /p:IncludeNativeLibrariesForSelfExtract=true
env:
VERSION: ${{ github.event_name == 'release' && github.ref_name || '0.0.0' }}
- name: Publish binary
if: github.event_name == 'release'
uses: Shopify/upload-to-release@1.0.0
with:
name: dev-oidc-toolkit-linux-x64
path: DevOidcToolkit/dist/dev-oidc-toolkit
repo-token: ${{ secrets.GITHUB_TOKEN }}
binary-build-linux-arm64:
name: Binary build linux-arm64
needs: [backend-checks, docs-build]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Download docs
uses: actions/download-artifact@v4
with:
name: docs
path: DevOidcToolkit/Documentation
- run: dotnet publish DevOidcToolkit -c Release -r linux-arm64 /p:PublishDir=dist /p:IncludeNativeLibrariesForSelfExtract=true
env:
VERSION: ${{ github.event_name == 'release' && github.ref_name || '0.0.0' }}
- name: Publish binary
if: github.event_name == 'release'
uses: Shopify/upload-to-release@1.0.0
with:
name: dev-oidc-toolkit-linux-arm64
path: DevOidcToolkit/dist/dev-oidc-toolkit
repo-token: ${{ secrets.GITHUB_TOKEN }}
binary-build-osx-arm64:
name: Binary build macOS arm64
needs: [backend-checks, docs-build]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Download docs
uses: actions/download-artifact@v4
with:
name: docs
path: DevOidcToolkit/Documentation
- run: dotnet publish DevOidcToolkit -c Release -r osx-arm64 /p:PublishDir=dist /p:IncludeNativeLibrariesForSelfExtract=true
env:
VERSION: ${{ github.event_name == 'release' && github.ref_name || '0.0.0' }}
- name: Publish binary
if: github.event_name == 'release'
uses: Shopify/upload-to-release@1.0.0
with:
name: dev-oidc-toolkit-osx-arm64
path: DevOidcToolkit/dist/dev-oidc-toolkit
repo-token: ${{ secrets.GITHUB_TOKEN }}
binary-build-win-x64:
name: Binary build Windows x64
needs: [backend-checks, docs-build]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Download docs
uses: actions/download-artifact@v4
with:
name: docs
path: DevOidcToolkit/Documentation
- run: dotnet publish DevOidcToolkit -c Release -r win-x64 /p:PublishDir=dist /p:IncludeNativeLibrariesForSelfExtract=true
env:
VERSION: ${{ github.event_name == 'release' && github.ref_name || '0.0.0' }}
- name: Publish binary
if: github.event_name == 'release'
uses: Shopify/upload-to-release@1.0.0
with:
name: dev-oidc-toolkit-win-x64.exe
path: DevOidcToolkit/dist/dev-oidc-toolkit.exe
repo-token: ${{ secrets.GITHUB_TOKEN }}
docker-build:
name: Docker image build
needs: [backend-checks]
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
- name: Log in to GitHub Container Registry
if: github.event_name == 'release'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push multi-arch image
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name == 'release' }}
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/businesssimulations/dev-oidc-toolkit:latest
ghcr.io/businesssimulations/dev-oidc-toolkit:${{ github.event_name == 'release' && github.ref_name || github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
VERSION=${{ github.event_name == 'release' && github.ref_name || '0.0.0' }}