From 57b2b55b861c7d9310bf12782ad9295410f9102e Mon Sep 17 00:00:00 2001 From: AlDIY <87589371+dosipod@users.noreply.github.com> Date: Tue, 23 Apr 2024 21:57:50 +0300 Subject: [PATCH] Create WLED_compile_eth_with_muti_relay.yaml --- .../WLED_compile_eth_with_muti_relay.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/WLED_compile_eth_with_muti_relay.yaml diff --git a/.github/workflows/WLED_compile_eth_with_muti_relay.yaml b/.github/workflows/WLED_compile_eth_with_muti_relay.yaml new file mode 100644 index 0000000..b2c281b --- /dev/null +++ b/.github/workflows/WLED_compile_eth_with_muti_relay.yaml @@ -0,0 +1,52 @@ +name: WLED_compile_eth_with_muti_relay + +on: + workflow_dispatch: + +jobs: + build: + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.9 + + - name: Install PlatformIO + run: | + python -m pip install --upgrade pip + pip install --upgrade platformio + - name: Set up Node.js + uses: actions/setup-node@v4 + - name: Run PlatformIO + run: | + rm -rf /tmp/WLEDtemp/* || true + mkdir -p /tmp/WLEDtemp + wget https://github.com/Aircoookie/WLED/archive/refs/heads/main.zip -O /tmp/WLEDtemp/mm.zip + unzip /tmp/WLEDtemp/mm.zip -d /tmp/WLEDtemp + find /tmp/WLEDtemp -maxdepth 1 -mindepth 1 -name "*" -type d >> /tmp/WLEDtemp/wledfoldername + cd `cat /tmp/WLEDtemp/wledfoldername` + npm install + echo '[env:custom_build]' >>platformio.ini + echo 'extends = env:esp32_eth' >>platformio.ini + echo 'build_flags = ${env:esp32_eth.build_flags} ${common.debug_flags} -D USERMOD_MULTI_RELAY' >>platformio.ini + + pio run -e custom_build || pio run -e custom_build + - name: Copy Files + run: | + cd $GITHUB_WORKSPACE + git rm -r $GITHUB_WORKSPACE/*.bin || true + WLEDFOLDERNAME=`cat /tmp/WLEDtemp/wledfoldername` + cp ${WLEDFOLDERNAME}/build_output/firmware/custom_build.bin $GITHUB_WORKSPACE/ + date -I | tr -d '\n' >$GITHUB_WORKSPACE/last_update_date.txt + - name: Commit Files + run: | + cd $GITHUB_WORKSPACE + git config user.name "GitHub Actions Bot" + git config user.email "<>" + git add $GITHUB_WORKSPACE/custom_build.bin + git add $GITHUB_WORKSPACE/last_update_date.txt + git commit -m "Commit Custom Build" + git push origin main