Skip to content

[ODS-5623] Make the Swagger Startup configurable #784

[ODS-5623] Make the Swagger Startup configurable

[ODS-5623] Make the Swagger Startup configurable #784

# SPDX-License-Identifier: Apache-2.0
# Licensed to the Ed-Fi Alliance under one or more agreements.
# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
# See the LICENSE and NOTICES files in the project root for more information.
name: Trigger EdFi.Ods.DB.Templates workflow in ODS repo
on:
pull_request:
branches:
- main-6x
push:
branches:
- main-6x
workflow_dispatch:
env:
EDFI_ODS_TOKEN: ${{ secrets.REPO_DISPATCH_TOKEN }}
HEAD_REF: ${{ GITHUB.HEAD_REF }}
REF_NAME: ${{ GITHUB.REF_NAME }}
REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set Current Branch Environment Variable
shell: pwsh
run: |
$current_branch = '${{env.REF_NAME}}'
if ($current_branch -like "*/merge"){
$current_branch = '${{env.HEAD_REF}}'
}
Write-Host "Current Branch: $current_branch"
echo "current_branch=$current_branch" >> $Env:GITHUB_ENV
- name: Dispatch to ODS repo
uses: peter-evans/repository-dispatch@11ba7d3f32dc7cc919d1c43f1fec1c05260c26b5 # v2
with:
token: ${{ env.EDFI_ODS_TOKEN }}
repository: Ed-Fi-Alliance-OSS/Ed-Fi-ODS
event-type: triggered-from-implementation-repo
client-payload: '{"branch": "${{ env.current_branch }}"}'