Skip to content

Limit PR checks to build only the modified images #32

Limit PR checks to build only the modified images

Limit PR checks to build only the modified images #32

---
"name": "Build Notebooks"
"on":
"pull_request":
permissions:
contents: read
packages: read
pull-requests: read
jobs:
gen:
name: Generate job matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.gen.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- run: |
python3 ci/cached-builds/gen_gha_matrix_jobs.py \
--owner=${{ github.repository_owner }} \
--repo=${{ github.event.pull_request.base.repo.name }} \
--pr-number=${{ github.event.pull_request.number }} \
--skip-unchanged
id: gen
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build:
needs: ["gen"]
strategy:
fail-fast: false
matrix: "${{ fromJson(needs.gen.outputs.matrix) }}"
if: "${{ fromJson(needs.gen.outputs.matrix).target != '[]' }}"
uses: ./.github/workflows/build-notebooks-TEMPLATE.yaml
with:
target: "${{ matrix.target }}"
github: "${{ toJSON(github) }}"
secrets: inherit