Skip to content

Commit e57b2bd

Browse files
committed
add first prototype of the generate-index workflow (still to test)
1 parent becf846 commit e57b2bd

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

.github/workflows/generate-index.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Generate Index
2+
3+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
branches:
7+
- umbynos/index_generation
8+
paths:
9+
- "generator/**"
10+
- "firmwares/**"
11+
- "poetry.lock"
12+
- "pyproject.toml"
13+
workflow_dispatch:
14+
repository_dispatch:
15+
16+
jobs:
17+
generate-index:
18+
runs-on: ubuntu-latest
19+
defaults:
20+
run:
21+
working-directory: generator
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v2
26+
27+
- name: Install Taskfile
28+
uses: arduino/setup-task@v1
29+
30+
- name: Install Python
31+
uses: actions/setup-python@v2
32+
with:
33+
python-version: "3.8"
34+
35+
- name: Install Poetry
36+
run: pip install poetry
37+
38+
- name: Install Arduino CLI
39+
uses: arduino/setup-arduino-cli@v1
40+
41+
- name: Install platforms
42+
run: |
43+
arduino-cli core update-index -v
44+
arduino-cli version
45+
arduino-cli core install arduino:samd@${{ env.SAMD_V }} -v
46+
arduino-cli core install arduino:megaavr@${{ env.MEGAAVR_V }} -v
47+
arduino-cli core install arduino:mebd_nano@${{ env.MBED_NANO_V }} -v
48+
env:
49+
SAMD_V: 1.18.11
50+
MEGAAVR_V: 1.8.7
51+
MBED_NANO_V: 2.2.0
52+
53+
- name: Install dependencies
54+
run: task poetry:install-deps
55+
56+
- name: Generate index
57+
run: ./generator.py -a $(which arduino-cli)
58+
59+
- name: Import GPG key
60+
run: |
61+
echo "${{ secrets.GPG_PRIVATE_KEY }}" > private.key
62+
gpg --import --batch --passphrase ${{ secrets.PASSPHRASE }} private.key
63+
64+
- name: sign the json
65+
run: gpg --output boards/module_firmware_index.json.sig --detach-sign boards/module_firmware_index.json
66+
67+
- name: create the gzip
68+
run: gzip --keep boards/module_firmware_index.json
69+
70+
- name: s3 sync
71+
run: ./s3Copy.sh . s3://arduino-downloads-prod-beagle/arduino-fwuploader

0 commit comments

Comments
 (0)