diff --git a/.gitea/workflows/esp32test.yml b/.gitea/workflows/esp32test.yml index 2865215..15f35b1 100644 --- a/.gitea/workflows/esp32test.yml +++ b/.gitea/workflows/esp32test.yml @@ -40,15 +40,23 @@ jobs: with: path: /root/.arduino15/packages key: ${{ runner.os }}-esp32tool-${{ hashFiles("/root/additional.json") }} - restore-keys: ${{ runner.os }}-esp32tool- - - name: 安裝平台 + restore-keys: | + ${{ runner.os }}-esp32tool- + - name: 判斷平台是否安裝 + id: platformIsInstall run: | if [ -d "/root/.arduino15/packages/esp32" ]; then - echo "平台已被安裝 跳過安裝" + echo "isinstall=true" >> "$GITHUB_OUTPUT" else - arduino-cli core update-index - arduino-cli core install esp32:esp32 --additional-urls $additionalurls + echo "isinstall=false" >> "$GITHUB_OUTPUT" fi + - name: 判斷平台是否安裝 + run: echo ${{ steps.platformIsInstall.outputs.isinstall }} + - name: 安裝平台 + if: ${{ steps.platformIsInstall.outputs.isinstall == "true" }} + run: | + arduino-cli core update-index + arduino-cli core install esp32:esp32 --additional-urls $additionalurls - name: 安裝庫 run: | arduino-cli lib install "Adafruit ILI9341@1.6.1"