@@ -2,15 +2,14 @@ name: Generate Index
2
2
3
3
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
4
4
on :
5
- pull_request :
6
- branches :
7
- - umbynos/index_generation
8
5
push :
6
+ branches :
9
7
paths :
10
8
- " generator/**"
11
9
- " firmwares/**"
12
10
- " poetry.lock"
13
11
- " pyproject.toml"
12
+ - " .github/workflows/generate-index.yml"
14
13
workflow_dispatch :
15
14
repository_dispatch :
16
15
31
30
- name : Install Python
32
31
uses : actions/setup-python@v2
33
32
with :
34
- python-version : " 3.8 "
33
+ python-version : " 3.9 "
35
34
36
35
- name : Install Poetry
37
36
run : pip install poetry
@@ -45,28 +44,39 @@ jobs:
45
44
arduino-cli version
46
45
arduino-cli core install arduino:samd@${{ env.SAMD_V }} -v
47
46
arduino-cli core install arduino:megaavr@${{ env.MEGAAVR_V }} -v
48
- arduino-cli core install arduino:mebd_nano @${{ env.MBED_NANO_V }} -v
47
+ arduino-cli core install arduino:mbed_nano @${{ env.MBED_NANO_V }} -v
49
48
env :
50
- SAMD_V : 1.18 .11
49
+ SAMD_V : 1.8 .11
51
50
MEGAAVR_V : 1.8.7
52
51
MBED_NANO_V : 2.2.0
53
52
54
53
- name : Install dependencies
55
- run : task poetry:install-deps
54
+ run : |
55
+ cd $GITHUB_WORKSPACE
56
+ task poetry:install-deps
56
57
57
58
- name : Generate index
58
- run : ./generator.py -a $(which arduino-cli)
59
-
59
+ run : poetry run ./generator.py -a $(which arduino-cli)
60
+
61
+ # fix `gpg: signing failed: Inappropriate ioctl for device`
62
+ # https://github.com/keybase/keybase-issues/issues/2798
60
63
- name : Import GPG key
61
64
run : |
62
- echo "${{ secrets.GPG_PRIVATE_KEY }}" > private.key
63
- gpg --import --batch --passphrase ${{ secrets.PASSPHRASE }} private.key
64
-
65
+ echo "${{ secrets.GPG_PRIVATE_KEY }}" | base64 -di > private.key
66
+ gpg --batch --import --passphrase "${{ secrets.PASSPHRASE }}" private.key
67
+ echo "GPG_TTY=$(tty)" >> $GITHUB_ENV
68
+
69
+ # disable gpg pass prompt
70
+ # https://stackoverflow.com/questions/49072403/suppress-the-passphrase-prompt-in-gpg-command
65
71
- name : sign the json
66
- run : gpg --output boards/module_firmware_index.json.sig --detach-sign boards/module_firmware_index.json
72
+ run : gpg --pinentry-mode=loopback --passphrase "${{ secrets.PASSPHRASE }}" -- output boards/module_firmware_index.json.sig --detach-sign boards/module_firmware_index.json
67
73
68
74
- name : create the gzip
69
75
run : gzip --keep boards/module_firmware_index.json
70
76
71
77
- name : s3 sync
72
78
run : ./s3Copy.sh . s3://arduino-downloads-prod-beagle/arduino-fwuploader
79
+ env :
80
+ AWS_REGION : " us-east-1" # or https://github.com/aws/aws-cli/issues/5623
81
+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
82
+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
0 commit comments