Skip to content

Commit 57197d2

Browse files
committed
Add index signature
1 parent e8dc224 commit 57197d2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/sync-binaries-task.yml

+16
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,22 @@ jobs:
4343
- name: Generate binaries and index
4444
run: python ./firmware/generator.py -a $(which arduino-cli)
4545

46+
# fix `gpg: signing failed: Inappropriate ioctl for device`
47+
# https://github.com/keybase/keybase-issues/issues/2798
48+
- name: Import GPG key
49+
run: |
50+
echo "${{ secrets.GPG_PRIVATE_KEY }}" | base64 -di > /tmp/private.key
51+
gpg --batch --import --passphrase "${{ secrets.PASSPHRASE }}" /tmp/private.key
52+
echo "GPG_TTY=$(tty)" >> $GITHUB_ENV
53+
54+
# disable gpg pass prompt
55+
# https://stackoverflow.com/questions/49072403/suppress-the-passphrase-prompt-in-gpg-command
56+
- name: sign the json
57+
run: gpg --pinentry-mode=loopback --passphrase "${{ secrets.PASSPHRASE }}" --output firmware/binaries/index.json.sig --detach-sign firmware/binaries/index.json
58+
59+
- name: create the gzip
60+
run: gzip --keep firmware/binaries/index.json
61+
4662
- name: s3 sync
4763
run: |
4864
aws s3 sync ./firmware/binaries s3://cloud-downloads.oniudra.cc/binaries

0 commit comments

Comments
 (0)