esp-idf-ci-action/action.yml

31 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2021-06-29 09:31:48 +02:00
name: "Espressif IoT Development Framework (ESP-IDF)"
description: "This action builds your firmware for ESP32 directly in GitHub using Espressif ESP-IDF Docker image."
2020-08-17 08:31:42 +02:00
branding:
2021-06-29 09:31:48 +02:00
color: red
icon: wifi
2020-12-28 08:35:27 -08:00
inputs:
path:
description: 'Relative path under $GITHUB_WORKSPACE to place the repository'
default: ''
2022-02-13 23:40:10 +03:00
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
2022-02-13 23:40:10 +03:00
2020-08-17 08:31:42 +02:00
runs:
2022-02-13 23:40:10 +03:00
using: "composite"
steps:
- run: |
export IDF_TARGET=$(echo "${{ inputs.target }}" | tr '[:upper:]' '[:lower:]' | tr -d '_-')
docker run -t -e IDF_TARGET="${IDF_TARGET}" -v "${GITHUB_WORKSPACE}:/app/${{ github.repository }}" -w "/app/${{ github.repository }}/${{ inputs.path }}" espressif/idf:${{ inputs.esp_idf_version }} ${{ inputs.command }}
2022-02-13 23:40:10 +03:00
shell: bash