From f6ea9ab4eb71573d02803b4b23d41f8a8cd8dc6d Mon Sep 17 00:00:00 2001 From: WongXXgmail Date: Mon, 13 Jan 2025 08:30:14 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/esp32test?= =?UTF-8?q?.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/esp32test.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) 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"