-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (49 loc) · 1.74 KB
/
demos.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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
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 }}"