Update konflux BASE_IMAGE quay.io-aipcc-base-images-cpu to v3.6.0-ea.1-1785868204 #7183
This file contains hidden or 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": "Build Notebooks (pr)" | |
| "on": | |
| "pull_request": | |
| "paths-ignore": | |
| # Don't build images if the only thing that changed is image digests in manifests | |
| - manifests/base/params-latest.env | |
| - manifests/base/params.env | |
| # In fact, skip the build if there are only changes in manifests and nowhere else | |
| - manifests/** | |
| concurrency: | |
| group: ${{ format('{0}-{1}', github.workflow, github.event.pull_request.number) }} | |
| cancel-in-progress: true | |
| jobs: | |
| gen: | |
| name: Generate job matrix | |
| permissions: | |
| contents: read | |
| packages: read | |
| runs-on: ubuntu-26.04 | |
| outputs: | |
| matrix: ${{ steps.gen.outputs.matrix }} | |
| has_jobs: ${{ steps.gen.outputs.has_jobs }} | |
| is_fork: ${{ steps.fork-check.outputs.is_fork }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false # https://github.com/actions/checkout/issues/2312 | |
| - name: Login to GitHub Container Registry | |
| if: ${{ github.repository != 'opendatahub-io/notebooks' }} | |
| uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Check if PR is from a fork | |
| id: fork-check | |
| env: | |
| HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }} | |
| BASE_REPO: ${{ github.event.pull_request.base.repo.full_name }} | |
| run: | | |
| if [ "$HEAD_REPO" != "$BASE_REPO" ]; then | |
| echo "is_fork=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "is_fork=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Flag fork PR in workflow summary | |
| if: steps.fork-check.outputs.is_fork == 'true' | |
| run: | | |
| echo "::error title=Fork PR — subscription builds skipped::This PR is from a fork. Subscription builds (RHEL, AIPCC) need secrets unavailable to forks. Push your branch to the main repo for full CI." | |
| # RHAIENG-3914: use env vars to prevent GitHub Actions expression injection | |
| - name: Determine targets to build based on changed files | |
| run: | | |
| set -x | |
| git fetch --no-tags origin "pull/${PR_NUMBER}/head:${HEAD_REF}" | |
| git fetch --no-tags origin "+refs/heads/${BASE_REF}:refs/remotes/origin/${BASE_REF}" | |
| python3 ci/cached-builds/gen_gha_matrix_jobs.py \ | |
| --from-ref "origin/${BASE_REF}" \ | |
| --to-ref "${HEAD_REF}" \ | |
| --rhel-images include \ | |
| --s390x-images include | |
| id: gen | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| HEAD_REF: ${{ github.event.pull_request.head.ref }} | |
| BASE_REF: ${{ github.event.pull_request.base.ref }} | |
| shell: bash | |
| - name: Annotate PR for fork guidance | |
| if: steps.fork-check.outputs.is_fork == 'true' | |
| run: | | |
| FIRST_FILE=$(git diff --name-only "origin/${BASE_REF}...${HEAD_REF}" | head -1) | |
| FIRST_FILE="${FIRST_FILE:-CONTRIBUTING.md}" | |
| echo "::warning file=${FIRST_FILE},line=1,title=Fork PR — subscription builds skipped::Push your branch to the main repo for full CI. See CONTRIBUTING.md." | |
| env: | |
| HEAD_REF: ${{ github.event.pull_request.head.ref }} | |
| BASE_REF: ${{ github.event.pull_request.base.ref }} | |
| # ODH builds — run for all PRs (fork and same-repo) on opendatahub-io only | |
| # rhds/notebooks builds from quay.io/aipcc bases via build-rhoai below | |
| build-odh: | |
| name: "${{ matrix.target }} · ${{ matrix.platform }} [odh]" | |
| permissions: | |
| contents: read | |
| packages: read | |
| needs: ["gen"] | |
| strategy: | |
| fail-fast: false | |
| matrix: "${{ fromJson(needs.gen.outputs.matrix) }}" | |
| uses: ./.github/workflows/build-notebooks-TEMPLATE.yaml | |
| if: ${{ fromJson(needs.gen.outputs.has_jobs) && github.repository != 'red-hat-data-services/notebooks' }} | |
| with: | |
| target: "${{ matrix.target }}" | |
| python: "${{ matrix.python }}" | |
| github: "${{ toJSON(github) }}" | |
| platform: "${{ matrix.platform }}" | |
| subscription: "${{ matrix.subscription }}" | |
| secrets: inherit | |
| # RHOAI builds — same-repo PRs only (secrets available via pull_request trigger) | |
| build-rhoai: | |
| name: "${{ matrix.target }} · ${{ matrix.platform }} [rhoai]" | |
| permissions: | |
| contents: read | |
| packages: read | |
| needs: ["gen"] | |
| strategy: | |
| fail-fast: false | |
| matrix: "${{ fromJson(needs.gen.outputs.matrix) }}" | |
| uses: ./.github/workflows/build-notebooks-TEMPLATE.yaml | |
| if: ${{ fromJson(needs.gen.outputs.has_jobs) && needs.gen.outputs.is_fork == 'false' }} | |
| with: | |
| target: "${{ matrix.target }}" | |
| python: "${{ matrix.python }}" | |
| github: "${{ toJSON(github) }}" | |
| platform: "${{ matrix.platform }}" | |
| subscription: ${{ true }} | |
| product: rhoai | |
| secrets: inherit |