Main Workflow #25
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: Main Workflow | |
on: | |
workflow_dispatch: | |
inputs: | |
repo: | |
description: Repo to use | |
required: false | |
default: https://github.com/opencv/opencv.git | |
type: string | |
ref: | |
description: Branch or tag to use | |
required: true | |
type: string | |
jobs: | |
determine-build: | |
runs-on: ubuntu-latest | |
outputs: | |
legacy: ${{ steps.check_version.outputs.legacy }} | |
steps: | |
- name: Check if version is 3.x | |
id: check_version | |
run: | | |
if [[ "${{ github.event.inputs.ref }}" =~ ^3\..* ]]; then | |
echo "legacy=true" >> $GITHUB_ENV | |
echo "::set-output name=legacy::true" | |
else | |
echo "legacy=false" >> $GITHUB_ENV | |
echo "::set-output name=legacy::false" | |
fi | |
run-legacy-framework: | |
needs: determine-build | |
if: needs.determine-build.outputs.legacy == 'true' | |
uses: ./.github/workflows/build-legacy-framework.yaml | |
with: | |
repo: ${{ github.event.inputs.repo }} | |
ref: ${{ github.event.inputs.ref }} | |
run-xcframework: | |
needs: determine-build | |
if: needs.determine-build.outputs.legacy == 'false' | |
uses: ./.github/workflows/build-xcframework.yaml | |
with: | |
repo: ${{ github.event.inputs.repo }} | |
ref: ${{ github.event.inputs.ref }} | |