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