From dacb613ab160620cfc59665bcee0d8ddf32fb950 Mon Sep 17 00:00:00 2001 From: Igor Date: Mon, 3 Jul 2023 17:51:01 +0200 Subject: [PATCH] Update smoke-tests.yml --- .github/workflows/smoke-tests.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index bb7b74b4..fb9a338b 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -22,7 +22,7 @@ jobs: Prepare: name: "Power system on" outputs: - matrix: ${{steps.list_dirs.outputs.matrix}} + matrix: ${{steps.json.outputs.JSON_CONTENT}} runs-on: [self-hosted, Linux, local] steps: @@ -30,6 +30,7 @@ jobs: uses: armbian/actions/runner-prepare@main - name: Power on + if: ${{ true.test }} uses: armbian/actions/power-on@main with: KEY_POWER_ON: ${{ secrets.KEY_POWER_ON }} @@ -38,14 +39,21 @@ jobs: KNOWN_HOSTS_REPOSITORY: ${{ secrets.KNOWN_HOSTS_REPOSITORY }} - name: Determine changed kernels - id: list_dirs + id: json run: | - echo ::set-output name=matrix::$( - curl -H "Authorization: Token ${{ secrets.NETBOX_TOKEN }}" -H "Accept: application/json; indent=4" \ - "https://stuff.armbian.com/netbox/api/dcim/devices/?limit=500&name__empty=false&tenant=igor&status=active&device_role=DUT&tag=qa" \ - | jq '.results[] | .display, .primary_ip.address' | xargs -n2 -d'\n' | grep -v null | sed -e 's/ ([^()]*)//g' \ - | sed 's/\/24"/"/g' | sed "s/\" \"/:/g" | sed "s/\"//g" |jq -cnR '[inputs | select(length>0)]' | jq) + echo 'JSON_CONTENT<> $GITHUB_OUTPUT + echo '[ + "FriendlyElec Zero Pi:10.0.30.195", + "FriendlyElec Nanopi Neo 2 black:10.0.30.184" + ]' + echo 'EOF' >> $GITHUB_OUTPUT + + #echo ::set-output name=matrix::$( + #curl -H "Authorization: Token ${{ secrets.NETBOX_TOKEN }}" -H "Accept: application/json; indent=4" \ + #"https://stuff.armbian.com/netbox/api/dcim/devices/?limit=500&name__empty=false&tenant=igor&status=active&device_role=DUT&tag=qa" \ + #| jq '.results[] | .display, .primary_ip.address' | xargs -n2 -d'\n' | grep -v null | sed -e 's/ ([^()]*)//g' \ + #| sed 's/\/24"/"/g' | sed "s/\" \"/:/g" | sed "s/\"//g" |jq -cnR '[inputs | select(length>0)]' | jq) Test: name: "DUT" @@ -57,7 +65,7 @@ jobs: #max-parallel: 16 fail-fast: false matrix: - + node: ${{fromJson(needs.Prepare.outputs.matrix)}} steps: @@ -193,7 +201,8 @@ jobs: Stop: name: "Power system off" - if: always() + #if: always() + if: ${{ true.test }} needs: Test runs-on: [self-hosted, Linux, local] steps: