From 46147985eec2c1a37ee946f7384e50bb71c3e1b7 Mon Sep 17 00:00:00 2001 From: SuLingGG <1215009714@qq.com> Date: Fri, 15 Oct 2021 20:28:23 +0800 Subject: [PATCH] Workflows: Fix generate variables step --- .../workflows/build-rpi4-lean-openwrt-new.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-rpi4-lean-openwrt-new.yml b/.github/workflows/build-rpi4-lean-openwrt-new.yml index caa5cddc2..5be77d390 100644 --- a/.github/workflows/build-rpi4-lean-openwrt-new.yml +++ b/.github/workflows/build-rpi4-lean-openwrt-new.yml @@ -6,7 +6,7 @@ # Blog: https://p3terx.com #================================================= -name: Build Raspberry Pi 4 OpenWrt +name: Test Raspberry Pi 4 OpenWrt on: workflow_dispatch: @@ -115,20 +115,15 @@ jobs: id: make-env run: | cd $OPENWRTROOT - make diffconfig - cd $OPENWRTROOT/bin/packages/* - PLATFORM=$(basename `pwd`) - echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV - echo "::set-output name=PLATFORM::$(echo $PLATFORM)" - cd $OPENWRTROOT/bin/targets/* - TARGET=$(basename `pwd`) + export TARGET=$(cat .config | grep CONFIG_TARGET_BOARD | awk -F '"' '{print $2}') echo "TARGET=$TARGET" >> $GITHUB_ENV echo "::set-output name=TARGET::$(echo $TARGET)" - cd * - SUBTARGET=$(basename `pwd`) + export SUBTARGET=$(cat .config | grep CONFIG_TARGET_SUBTARGET | awk -F '"' '{print $2}') echo "SUBTARGET=$SUBTARGET" >> $GITHUB_ENV echo "::set-output name=SUBTARGET::$(echo $SUBTARGET)" - cd $OPENWRTROOT + export PLATFORM=$(cat .config | grep CONFIG_TARGET_ARCH_PACKAGES | awk -F '"' '{print $2}') + echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV + echo "::set-output name=PLATFORM::$(echo $PLATFORM)" rm -rf .config dl bin - name: Generate Toolchain Image