[deps]: Update Swashbuckle.AspNetCore to v7 #2042
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: migrations | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
env: | |
# Setting these variables allows .NET CLI to use rich color codes in console output | |
TERM: xterm | |
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: true | |
# Skip boilerplate output | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
DOTNET_NOLOGO: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
jobs: | |
script: | |
strategy: | |
matrix: | |
app: | |
- Api | |
- AdminConsole | |
include: | |
- app: Api | |
ef-context: DbGlobalMsSqlContext | |
- app: AdminConsole | |
ef-context: MssqlConsoleDbContext | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Install .NET | |
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0 | |
- name: Install Entity Framework toolkit | |
run: dotnet tool install dotnet-ef --global | |
- name: Generate script | |
run: > | |
dotnet ef migrations script | |
--configuration Release | |
--project src/${{ matrix.app }} | |
--context ${{ matrix.ef-context }} | |
--idempotent | |
--output ${{ matrix.app }}.sql | |
- name: Upload artifacts | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: ${{ matrix.app }}-${{ matrix.ef-context }} | |
path: ${{ matrix.app }}.sql | |
- name: Produce summary | |
run: | | |
echo "### Idempotent migrations for ${{ matrix.app }} (${{ matrix.ef-context }})" >> $GITHUB_STEP_SUMMARY | |
echo "\`\`\`sql" >> $GITHUB_STEP_SUMMARY | |
cat ${{ matrix.app }}.sql >> $GITHUB_STEP_SUMMARY | |
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY |