Skip to content

Commit

Permalink
Added siren-gen and workflow trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
gubpalma committed Aug 27, 2024
1 parent cd11f23 commit b03a22a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .github/workflows/siren-gen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: siren-gen

on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- '**/Migrations/**'
jobs:
siren-gen:
runs-on: ubuntu-latest
env:
MAJOR_VERSION: 6
MINOR_VERSION: 0
SOLUTION_PATH: ./src/6.0/
MIGRATION_DLL: Not.Again.Database.Migrations.dll
MARKDOWN_ANCHOR: "# Domain model"
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Install siren-gen tool
run: dotnet tool install -g Gman.Siren
- name: Restore dependencies
run: dotnet restore $SOLUTION_PATH
- name: Build
run: dotnet publish $SOLUTION_PATH --no-restore --ignore-failed-sources -c Release
- name: Create output folder
run: mkdir ./output
- name: Consolidate packages (including symbols)
run: find . -name "*.dll" -type f -exec cp {} ./output \;
- name: Echo packages
run: find ./output -name "*.dll" -type f -exec echo {} \;
- name: Run siren-gen on ModelSnapshot
run: siren-gen "./output/$MIGRATION_DLL" "README.md" "$MARKDOWN_ANCHOR"
- name: Commit README
run: |
git config user.email "info@gman.com.au"
git config user.name "G-MAN Support"
git commit README.md -m "Updated README (siren-gen)" || echo "No changes to commit"
git push origin || echo "No changes to commit"
2 changes: 1 addition & 1 deletion src/6.0/Not.Again.Database.Migrations/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ConnectionStrings": {
"NOT-AGAIN": "Data Source=localhost;Initial Catalog=NOT-AGAIN;Trusted Connection=True"
"NOT-AGAIN": "Initial Catalog=NOT-AGAIN;Data Source=localhost;Trusted Connection=True"
}
}

0 comments on commit b03a22a

Please sign in to comment.