From ce0d56a3fcd56321a96cf33ac84b5852b0a9437d Mon Sep 17 00:00:00 2001 From: zenobit Date: Sun, 26 Jan 2025 20:28:36 +0100 Subject: [PATCH] xxx --- .github/workflows/test-distros.yml | 45 ++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-distros.yml b/.github/workflows/test-distros.yml index 63f9aa15a3..f68c98fcbe 100644 --- a/.github/workflows/test-distros.yml +++ b/.github/workflows/test-distros.yml @@ -23,29 +23,56 @@ jobs: runs-on: ubuntu-22.04 outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} + supported: ${{ steps.list-supported.outputs.supported }} + steps: - name: "Check out repository" uses: actions/checkout@v4 - - name: "Generate Matrix" - id: set-matrix + - name: "Install dependencies 📦️" + run: | + sudo apt-get -y update 2> /dev/null || apt-get -y update + sudo apt-get -y install awk curl jq qemu-utils zsync 2> /dev/null || apt-get -y install awk curl jq qemu-utils zsync + + - name: "list files" run: | ls ./ - mkdir -p results - chmod a+x quickget - ./quickget | awk 'NR==3,/zorin/' | tr ' ' '\n' | tee results/testing.list + + - name: "make quickget executable" + run: | + chmod +x quickget + + - name: "quickget version" + run: | + ./quickget --version + + - name: "show supported" + run: | + ./quickget | awk 'NR==3,/zorin/' | tr ' ' '\n' + + - name: "variable" + id: list-supported + run: | SUPPORTED=$(./quickget | awk 'NR==3,/zorin/' | tr ' ' '\n') + echo "supported=$SUPPORTED" >> $GITHUB_OUTPUT + + - name: "display supported" + run: | + echo "${{ steps.list-supported.outputs.supported }}" + + - name: "Generate Matrix" + id: set-matrix + run: | MATRIX="{\"include\": [" - for os in $SUPPORTED; do + for os in $supported; do MATRIX+="{\"os\": \"$os\"}," done MATRIX="${MATRIX%,}]}" - echo "Generated Matrix: $MATRIX" + #echo "Generated Matrix: $MATRIX" echo "matrix=$MATRIX" >> $GITHUB_OUTPUT - - name: "Display Matrix" + - name: "display Matrix" run: | - echo "Matrix:" echo "${{ steps.set-matrix.outputs.matrix }}" run-actions: