diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..537c56e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: Build the boxes + +"on": + workflow_dispatch: + +jobs: + collect: + name: Discover distros + runs-on: ubuntu-latest + outputs: + distros: ${{ steps.distros.outputs.distros }} + steps: + - uses: actions/checkout@v3 + - name: Discover boxes + id: distros + run: |- + set -eo pipefail + distros=$(ls distros/ | jq -cRs 'split("\n") | [ .[] | if length > 0 then . else empty end ]') + echo "::set-output name=distros::${distros}" + + build: + name: Build box + runs-on: ubuntu-latest + needs: + - collect + strategy: + fail-fast: false + matrix: + distro: ${{ fromJson( needs.collect.outputs.distros ) }} + steps: + - uses: actions/checkout@v3 + - name: Echo name + run: |- + echo ${{ matrix.distro }}