Skip to content

Create dynamic.yml

Create dynamic.yml #14

Workflow file for this run

name: "Test dynamic 🧪"
on:
workflow_dispatch:
push:
pull_request:
branches:
- '**'
jobs:
generate-matrix:
name: "Generate Matrix Configuration"
runs-on: ubuntu-22.04
outputs:
matrix: ${{ steps.generate.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- name: "Install dependencies 📦️"
run: sudo apt-get -y update && sudo apt-get -y install jq
- name: "Generate OS matrix 📃"
id: generate
run: |
./quickget | awk 'NR==2,/zorin/' | cut -d':' -f2 | grep -o '[^ ]*' | tail -n +2 | jq -R -s -c 'split("\n")[:-1] | map({os: .})' > matrix.json
cat matrix.json
echo "::set-output name=matrix::$(cat matrix.json)"
- name: Debug generated matrix
run: cat matrix.json
testing:
name: "Test"
needs: generate-matrix
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: "Install dependencies 📦️"
run: sudo apt-get -y update && sudo apt-get -y install curl qemu-utils jq
- name: "Check ${{ matrix.config.os }} downloads 💿️"
run: |
mkdir -p results
./quickget --check ${{ matrix.config.os }} > results/${{ matrix.config.os }}.txt
- name: "Display results 📊"
run: cat results/${{ matrix.config.os }}.txt