Skip to content

Commit

Permalink
Update test-distros.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
zen0bit committed Jan 26, 2025
1 parent 0f073c8 commit 6a7ba34
Showing 1 changed file with 41 additions and 9 deletions.
50 changes: 41 additions & 9 deletions .github/workflows/test-distros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,60 @@ 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 || apt-get -y update
sudo apt-get -y install gawk curl jq qemu-system-x86 qemu-utils zsync || apt-get -y install gawk curl jq qemu-system-x86 qemu-utils zsync
- name: "list files"
run: |
ls ./
- name: "make quickget executable"
run: |
chmod +x quickget
- name: "quickget version"
run: |
./quickget --version
- name: "create dir"
run: |
mkdir -p results
./quickget | awk 'NR==3,/zorin/' | tr ' ' '\n' | tee results/testing.list
SUPPORTED=$(./quickget | awk 'NR==3,/zorin/' | tr ' ' '\n')
- name: "show supported"
run: |
./quickget | awk 'NR==3,/zorin/' | tr ' ' '\n' | jq -R . | jq -s . > results/supported.json
- name: "variable"
id: list-supported
run: |
SUPPORTED=$(cat results/supported.json)
echo "supported=$SUPPORTED" >> $GITHUB_OUTPUT
- name: "display supported"
run: |
cat results/supported.json
- 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:
Expand All @@ -53,7 +85,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
matrix: ${{ fromJson(needs.set-matrix.outputs.matrix) }}
steps:
- name: "Check out repository"
uses: actions/checkout@v4
Expand Down

0 comments on commit 6a7ba34

Please sign in to comment.