Turn target list into json #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Gluon | |
on: | |
push: | |
env: | |
GLUON_RELEASE: v2021.1.2 | |
jobs: | |
gather_targets: | |
name: Gather targets | |
runs-on: ubuntu-24.04 | |
outputs: | |
targets: ${{ fromJson(steps.list.outputs.targets) }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: freifunk-gluon/gluon | |
ref: ${{ env.GLUON_RELEASE }} | |
- uses: actions/checkout@v4 | |
with: | |
path: site | |
- run: | | |
TARGETS=$(make list-targets) | |
# save to output as json | |
echo "targets=[\"${TARGETS//$'\n'/\",\"}\"]" >> $GITHUB_OUTPUT | |
id: list | |
build: | |
needs: gather_targets | |
name: Build Images | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
target: ${{ needs.gather_targets.outputs.targets }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: freifunk-gluon/gluon | |
ref: ${{ env.GLUON_RELEASE }} | |
- uses: actions/checkout@v4 | |
with: | |
path: site | |
- run: | | |
echo "Not building target ${{ matrix.target }}" |