forked from espressif/esp-idf-ci-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
30 lines (29 loc) · 1.13 KB
/
action.yml
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
name: "Espressif IoT Development Framework (ESP-IDF)"
description: "This action builds your firmware for ESP32 directly in GitHub using Espressif ESP-IDF Docker image."
branding:
color: red
icon: wifi
inputs:
path:
description: 'Relative path under $GITHUB_WORKSPACE to place the repository'
default: ''
required: false
esp_idf_version:
description: 'Version of ESP-IDF docker image to use'
default: 'latest'
required: false
target:
description: 'ESP32 variant to build for'
default: 'esp32'
required: false
command:
description: 'Command to run inside the docker container (default: builds the project)'
default: 'idf.py build'
required: false
runs:
using: "composite"
steps:
- run: |
export IDF_TARGET=$(echo "${{ inputs.target }}" | tr '[:upper:]' '[:lower:]' | tr -d '_-')
docker run -t -e IDF_TARGET="${IDF_TARGET}" --privileged -v "${GITHUB_WORKSPACE}:/app/${{ github.repository }}" --device=/dev/ttyUSB0:/dev/xvdc:rwm -w "/app/${{ github.repository }}/${{ inputs.path }}" espressif/idf:${{ inputs.esp_idf_version }} sh -c ${{ inputs.command }}
shell: bash