Skip to content

Demos

Demos #16

Workflow file for this run

name: Demos
on:
workflow_dispatch:
inputs:
release_version:
type: string
description: Which release version to upload packages to (tag name)
default: "latest"
demo_names:
type: string
description: Which demos to upload (specific one or regex for multiple)
default: ''
demos_all:
type: boolean
description: Select to upload all demos in repository
default: false
dbp:
type: boolean
default: true
description: If selected, will upload for NECTO 7.1.0+ versions
index:
type: choice
description: If releasing for Legacy, choose where to index to
options:
- Test
- Live
- Both
jobs:
Upload:
runs-on: ubuntu-latest
steps:
- name: Authorize Mikroe Actions App
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.MIKROE_ACTIONS }}
private-key: ${{ secrets.MIKROE_DEMOS_KEY }}
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements/demos.txt
- name: Package and upload demos
run: |
echo "Uploading demos..."
python -u scripts/workflows/demos_upload.py ${{ github.repository }} ${{ steps.app-token.outputs.token }} ${{ github.event.inputs.release_version }} ${{ secrets.PACKER_DOWNLOAD_LINK }} ${{ secrets.PACKER_USERNAME }} ${{ secrets.PACKER_PASSWORD }} ${{ secrets.PACKER_URL }} "${{ github.event.inputs.demo_names }}" "--all_demos" "${{ github.event.inputs.demos_all }}" "--dbp" "${{ github.event.inputs.dbp }}"
- name: Index legacy packages
if : ${{ github.event.inputs.dbp == 'false' }}
run: |
echo "TODO - implement"