From 6e0d801a7e3bd844955c8eeaa083c37d508988d9 Mon Sep 17 00:00:00 2001 From: John Coffey Date: Thu, 19 Nov 2026 23:01:21 -0700 Subject: [PATCH 1/2] The lab on every chart branch, its result on the Gitea commit (K-L8) --- .github/workflows/lab.yml | 73 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/workflows/lab.yml diff --git a/.github/workflows/lab.yml b/.github/workflows/lab.yml new file mode 100644 index 0000000..14967bf --- /dev/null +++ b/.github/workflows/lab.yml @@ -0,0 +1,73 @@ +# SPDX-FileCopyrightText: 2026 Coffey Labs LLC +# SPDX-License-Identifier: Apache-2.0 +# +# The lab on every chart branch (K-L8): each push to a branch other than +# main (a pull request's, on Gitea, reaches here by the push mirror) runs +# inbuxa-k8s-lab's end-to-end workflow against that commit, on the three +# Kubernetes minors, amd64. main is covered by the lab's nightly run, on +# both architectures. +# +# The result goes back to the commit on Gitea as the status "lab / e2e", so +# the pull request shows it: pending when the run starts, then success or +# failure. Only those two small jobs hold GITEA_TOKEN; the lab runs +# without it. +name: lab + +on: + push: + branches-ignore: [main] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: lab-${{ github.ref }} + cancel-in-progress: true + +jobs: + pending: + if: ${{ vars.BUILD_ON == 'github' }} + runs-on: ubuntu-24.04 + steps: + - name: Status on Gitea + env: + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + GITEA_URL: ${{ vars.GITEA_URL }} + RUN: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + run: | + jq -n --arg u "$RUN" '{state: "pending", context: "lab / e2e", target_url: $u, description: "the lab on GitHub: Kubernetes 1.35-1.37, amd64"}' | + curl -fsS --retry 3 -o /dev/null -X POST -H "Authorization: token $GITEA_TOKEN" -H 'Content-Type: application/json' \ + --data @- "$GITEA_URL/api/v1/repos/inbuxa/inbuxa-charts/statuses/$GITHUB_SHA" + + lab: + if: ${{ vars.BUILD_ON == 'github' }} + # Our own repository's workflow, at its main + uses: inbuxa/inbuxa-k8s-lab/.github/workflows/e2e.yml@feat/kl8-matrix + with: + chart_ref: ${{ github.sha }} + lab_ref: feat/kl8-matrix + architectures: '["ubuntu-24.04"]' + + report: + needs: lab + if: ${{ always() && vars.BUILD_ON == 'github' }} + runs-on: ubuntu-24.04 + steps: + - name: Status on Gitea + env: + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + GITEA_URL: ${{ vars.GITEA_URL }} + RUN: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + RESULT: ${{ needs.lab.result }} + run: | + case "$RESULT" in + success) state=success; what="passed" ;; + cancelled) state=error; what="cancelled (a newer push?)" ;; + *) state=failure; what="failed" ;; + esac + jq -n --arg s "$state" --arg u "$RUN" --arg d "the lab on GitHub $what" \ + '{state: $s, context: "lab / e2e", target_url: $u, description: $d}' | + curl -fsS --retry 3 -o /dev/null -X POST -H "Authorization: token $GITEA_TOKEN" -H 'Content-Type: application/json' \ + --data @- "$GITEA_URL/api/v1/repos/inbuxa/inbuxa-charts/statuses/$GITHUB_SHA" + echo "lab / e2e: $state" -- 2.54.0 From af8715008cce8dda3e5b1c86bc3c5705f440d4fd Mon Sep 17 00:00:00 2001 From: John Coffey Date: Thu, 19 Nov 2026 23:08:00 -0700 Subject: [PATCH 2/2] lab: call the lab's workflow at its main --- .github/workflows/lab.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lab.yml b/.github/workflows/lab.yml index 14967bf..780ff6e 100644 --- a/.github/workflows/lab.yml +++ b/.github/workflows/lab.yml @@ -43,10 +43,10 @@ jobs: lab: if: ${{ vars.BUILD_ON == 'github' }} # Our own repository's workflow, at its main - uses: inbuxa/inbuxa-k8s-lab/.github/workflows/e2e.yml@feat/kl8-matrix + uses: inbuxa/inbuxa-k8s-lab/.github/workflows/e2e.yml@main with: chart_ref: ${{ github.sha }} - lab_ref: feat/kl8-matrix + lab_ref: main architectures: '["ubuntu-24.04"]' report: -- 2.54.0