Skip to content

feat(oai): build -w USRP + rfsim so one dapp-oai image serves both su… #9

feat(oai): build -w USRP + rfsim so one dapp-oai image serves both su…

feat(oai): build -w USRP + rfsim so one dapp-oai image serves both su… #9

name: dApp image build status (dry-run)
# Reports what the dApp image build WOULD produce on each push to dApp-framework, WITHOUT building
# or pushing anything yet. Keeps CI "in the loop" while the base-build story is settled.
#
# The heavy base (UHD + deps + libe3 + OAI) is built locally via docker/build-base.sh and pushed to
# ghcr.io/wineslab/dapp-oai-base (linked to this repo via the image's org.opencontainers.image.source
# label). When ready to publish the dApp image, add docker login + build/push steps using the values
# this job already computes (tags: :latest and :<dApp-library VERSION>).
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
report:
name: Report would-be dApp image build
if: github.repository == 'wineslab/dapp-framework'
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # needed to diff submodule pointers across the push
- name: Compute and report would-be build
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
IMAGE="ghcr.io/${{ github.repository_owner }}/dapp-oai"
SUBS="dApp-openairinterface5g dApp-library dApp-flexric dApp-libe3"
FW_SHA="$(git rev-parse --short HEAD)"
# Which submodule pointers changed in this push (n/a for manual dispatch / initial push).
before="${{ github.event.before }}"
changed="(n/a — not a push diff)"
if [ "${{ github.event_name }}" = "push" ] && [ -n "$before" ] \
&& [ "$before" != "0000000000000000000000000000000000000000" ]; then
changed="$(git diff --name-only "$before" "${{ github.sha }}" -- $SUBS | tr '\n' ' ')"
[ -z "$changed" ] && changed="(none)"
fi
# dApp-library VERSION at the pinned commit, without checking the submodule out.
dapp_sha="$(git rev-parse 'HEAD:dApp-library')"
version="$(gh api "repos/wineslab/dApp-library/contents/VERSION?ref=$dapp_sha" \
--jq '.content' 2>/dev/null | base64 -d 2>/dev/null | tr -d '[:space:]' || true)"
[ -z "$version" ] && version="unknown"
{
echo "## dApp image — dry-run (no build / no push)"
echo ""
echo "| field | value |"
echo "|---|---|"
echo "| framework commit | \`$FW_SHA\` |"
echo "| changed submodules | $changed |"
echo "| dApp-library pinned | \`${dapp_sha:0:12}\` (VERSION \`$version\`) |"
echo "| would-be tags | \`$IMAGE:latest\`, \`$IMAGE:$version\` |"
echo ""
case " $changed " in
*dApp-openairinterface5g*|*dApp-flexric*|*dApp-libe3*)
echo "> :warning: A base-affecting submodule (OAI / FlexRIC / libe3) changed — rebuild the base locally with \`./docker/build-base.sh\` before publishing." ;;
esac
} | tee -a "$GITHUB_STEP_SUMMARY"