diff --git a/.github/workflows/recursiveBuild.yaml b/.github/workflows/recursiveBuild.yaml index 237ab769f..989b6bc26 100644 --- a/.github/workflows/recursiveBuild.yaml +++ b/.github/workflows/recursiveBuild.yaml @@ -3,12 +3,18 @@ name: SDK Recursive Build on: workflow_dispatch: inputs: - build_type: - type: choice - description: Build all or only changed files - options: - - Only changed files - - All files + build_type: + type: choice + description: Build all or only changed files + options: + - Only changed files + - All files + necto_type: + type: choice + description: Live or Development NECTO build + options: + - Development + - Live pull_request: branches: - master @@ -49,6 +55,11 @@ jobs: - name: Install NECTO run: | + if [[ "${{ github.event.inputs.necto_type }}" == 'Live' ]]; then + export NECTO_DOWNLOAD_URL=${{ secrets.NECTO_LIVE_DOWNLOAD_URL }} + else + export NECTO_DOWNLOAD_URL=${{ secrets.NECTO_DEV_DOWNLOAD_URL }} + fi python -u scripts/install_necto.py - name: Run Recursive Build diff --git a/scripts/install_necto.py b/scripts/install_necto.py index fd67d9268..49a460876 100644 --- a/scripts/install_necto.py +++ b/scripts/install_necto.py @@ -21,9 +21,11 @@ def main(): for file in os.listdir(os.getcwd()): print(file) - print("Step 1: Download NECTO") - url = "https://software-update.mikroe.com/NECTOStudio7/development/necto/linux/NECTOInstaller.zip" - print(url) + url = os.getenv('NECTO_DOWNLOAD_URL') + if 'live' in url: + print("Step 1: Downloading Live NECTOStudio version") + else: + print("Step 1: Downloading Development NECTOStudio version") urllib.request.urlretrieve(url, "NECTOInstaller.zip") print("Step 2: Extract installer")