Skip to content

Update dependency netbootxyz/netboot.xyz to v2.0.83 (#83) #224

Update dependency netbootxyz/netboot.xyz to v2.0.83 (#83)

Update dependency netbootxyz/netboot.xyz to v2.0.83 (#83) #224

Workflow file for this run

name: "Build affected images on commit"
on:
push:
branches:
- master
paths:
- "apps/**"
- "!apps/**/README.md"
jobs:
get-changes:
name: Collect changes
runs-on: ubuntu-latest
outputs:
addedOrModifiedImages: ${{ steps.collect-changes.outputs.addedOrModifiedImages }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Collect changes
id: collect-changes
uses: ./.github/actions/collect-changes
generate-build-matrix:
name: Generate matrix for building images
runs-on: ubuntu-latest
needs: ["get-changes"]
outputs:
matrix: ${{ steps.get-changed.outputs.changes }}
if: ${{ needs.get-changes.outputs.addedOrModifiedImages }} != '[]'
steps:
- name: Install tools
run: sudo apt-get install moreutils jo
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Fetch modified images
id: get-changed
shell: bash
run: |
set -x
declare -a changes_array=()
while read -r app
do
while read -r build
do
change="$(jo app="$app" build="$build")"
changes_array+=($change)
done < <(yq -r '.builds[] | .name' "./apps/$app/.ci/metadata.yaml")
done < <(echo '${{ needs.get-changes.outputs.addedOrModifiedImages }}' | jq --raw-output -c '.[]')
output="$(jo -a ${changes_array[*]})"
echo "changes=${output}" >> $GITHUB_OUTPUT
images-build:
uses: ./.github/workflows/action-image-build.yaml
needs:
- generate-build-matrix
with:
imagesToBuild: "${{ needs.generate-build-matrix.outputs.matrix }}"
pushImages: "true"
secrets: inherit