Add action.yml
This commit is contained in:
36
action.yml
Normal file
36
action.yml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
name: Install esp-idf
|
||||||
|
description: Installs or updates esp-idf dependencies (and caches them)
|
||||||
|
inputs:
|
||||||
|
idfpath:
|
||||||
|
description: Path to esp-idf (should be a submodule of the firmware repository)
|
||||||
|
required: true
|
||||||
|
default: esp-idf
|
||||||
|
outputs: {}
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Get esp-idf release name
|
||||||
|
id: get-esp-idf-release
|
||||||
|
uses: 0xFEEDC0DE64/get_latest_tag@main
|
||||||
|
with:
|
||||||
|
repo: ${{ inputs.idfpath }}
|
||||||
|
|
||||||
|
- name: Cache .espressif
|
||||||
|
id: cache-espressif
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.espressif
|
||||||
|
key: ${{ runner.os }}-${{ steps.get-esp-idf-release.outputs.tag_name }}
|
||||||
|
|
||||||
|
- name: Install .espressif dependencies
|
||||||
|
# GitHub doesnt support if
|
||||||
|
#if: steps.cache-espressif.outputs.cache-hit != 'true'
|
||||||
|
#run: $(realpath -s "${{ inputs.idfpath }}")/install.sh
|
||||||
|
run: |
|
||||||
|
if echo ${{ steps.cache-espressif.outputs.cache-hit }} | grep -c "true"
|
||||||
|
then
|
||||||
|
echo "Cache hit - skipping esp-idf install"
|
||||||
|
else
|
||||||
|
$(realpath -s "${{ inputs.idfpath }}")/install.sh
|
||||||
|
fi
|
||||||
|
shell: bash
|
Reference in New Issue
Block a user