mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-16 05:42:56 +00:00
try to update cache for esp-idf
This commit is contained in:
parent
4e24ec5e5d
commit
1d7aeb3fb6
@ -11,32 +11,31 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- id: set-docker-image
|
- name: Set DOCKER_ESP_IDF
|
||||||
run: |
|
run: |
|
||||||
DOCKER_IMAGE=$HOME/cache/${{ inputs.toolchain }}/docker_image.tar
|
DOCKER_ESP_IDF=$HOME/cache/${{ inputs.toolchain }}/docker_image.tar
|
||||||
echo "DOCKER_IMAGE=$DOCKER_IMAGE" >> $GITHUB_ENV
|
echo "DOCKER_ESP_IDF=$DOCKER_ESP_IDF" >> $GITHUB_ENV
|
||||||
echo "DOCKER_IMAGE=$DOCKER_IMAGE" >> $GITHUB_OUTPUT
|
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Cache Docker Image
|
- name: Cache Docker Image
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
id: cache-toolchain-espressif
|
id: cache-toolchain-espressif
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.set-docker-image.outputs.DOCKER_IMAGE }}
|
path: ${{ env.DOCKER_ESP_IDF }}
|
||||||
key: ${{ inputs.toolchain }}-${{ inputs.toolchain_url }}
|
key: ${{ inputs.toolchain }}-${{ inputs.toolchain_url }}
|
||||||
|
|
||||||
- name: Pull and Save Docker Image
|
- name: Pull and Save Docker Image
|
||||||
if: steps.cache-toolchain-espressif.outputs.cache-hit != 'true'
|
if: steps.cache-toolchain-espressif.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
docker pull espressif/idf:${{ inputs.toolchain_url }}
|
docker pull espressif/idf:${{ inputs.toolchain_url }}
|
||||||
mkdir -p ~/cache/${{ inputs.toolchain }}
|
mkdir -p $(dirname $DOCKER_ESP_IDF)
|
||||||
docker save -o $DOCKER_IMAGE espressif/idf:${{ inputs.toolchain_url }}
|
docker save -o $DOCKER_ESP_IDF espressif/idf:${{ inputs.toolchain_url }}
|
||||||
du -sh $DOCKER_IMAGE
|
du -sh $DOCKER_ESP_IDF
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Load Docker Image
|
- name: Load Docker Image
|
||||||
if: steps.cache-toolchain-espressif.outputs.cache-hit == 'true'
|
if: steps.cache-toolchain-espressif.outputs.cache-hit == 'true'
|
||||||
run: |
|
run: |
|
||||||
du -sh $DOCKER_IMAGE
|
du -sh $DOCKER_ESP_IDF
|
||||||
docker load --input $DOCKER_IMAGE
|
docker load --input $DOCKER_ESP_IDF
|
||||||
shell: bash
|
shell: bash
|
||||||
|
Loading…
x
Reference in New Issue
Block a user