diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index fc3b145..1f79103 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -375,6 +375,32 @@ jobs: exit 1 fi + - name: Get esp-idf release name + id: get-esp-idf-release + uses: 0xFEEDC0DE64/get_latest_tag@main + with: + repo: repository/esp-idf + + - name: Cache .espressif + id: cache-espressif + uses: actions/cache@v2 + with: + path: ~/.espressif + key: ${{ runner.os }}-espressif-${{ steps.get-esp-idf-release.outputs.tag_name }} + + - name: Verify that "Cache .espressif" had a hit + # GitHub doesnt support if + #if: steps.cache-espressif.outputs.cache-hit != 'true' + #run: git submodule update --init --recursive ${{ inputs.submodule }} + run: | + if echo ${{ steps.cache-espressif.outputs.cache-hit }} | grep -c "true" + then + echo "Cache .espressif had a hit, good" + else + echo "Cache .espressif did not hit? Did the prepare step run successfully?" + exit 1 + fi + - name: Cache sonar-scanner uses: actions/cache@v2 id: cache-sonar-scanner