Skip to content

Bump jinja2 from 3.0.1 to 3.1.3 (#238) #67

Bump jinja2 from 3.0.1 to 3.1.3 (#238)

Bump jinja2 from 3.0.1 to 3.1.3 (#238) #67

name: Generate Index
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
on:
push:
branches:
- main
paths:
- "generator/**"
- "firmwares/**"
- "poetry.lock"
- "pyproject.toml"
- ".github/workflows/generate-index.yml"
workflow_dispatch:
repository_dispatch:
jobs:
generate-index:
runs-on: ubuntu-latest
defaults:
run:
working-directory: generator
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Taskfile
uses: arduino/setup-task@v1
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install Poetry
run: pip install poetry
- name: Install dependencies
run: |
cd $GITHUB_WORKSPACE
task poetry:install-deps
- name: Generate plugin firmware index
run: poetry run ./generator.py
# fix `gpg: signing failed: Inappropriate ioctl for device`
# https://github.com/keybase/keybase-issues/issues/2798
- name: Import GPG key
run: |
echo "${{ secrets.GPG_PRIVATE_KEY }}" | base64 -di > /tmp/private.key
gpg --batch --import --passphrase "${{ secrets.PASSPHRASE }}" /tmp/private.key
echo "GPG_TTY=$(tty)" >> $GITHUB_ENV
# disable gpg pass prompt
# https://stackoverflow.com/questions/49072403/suppress-the-passphrase-prompt-in-gpg-command
- name: sign the plugin firmware index json
run: |
gpg \
--pinentry-mode=loopback \
--passphrase "${{ secrets.PASSPHRASE }}" \
--output boards/plugin_firmware_index.json.sig \
--detach-sign boards/plugin_firmware_index.json
- name: create the gzip
run: gzip --keep boards/plugin_firmware_index.json
- name: s3 sync
run: |
aws s3 sync boards/ s3://${{ secrets.DOWNLOADS_BUCKET }}/arduino-fwuploader/boards
aws s3 sync firmwares/ s3://${{ secrets.DOWNLOADS_BUCKET }}/arduino-fwuploader/firmwares
env:
AWS_REGION: "us-east-1" # or https://github.com/aws/aws-cli/issues/5623
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}