From 02946a5318493872f32bdbb58137241d9f3f0087 Mon Sep 17 00:00:00 2001 From: Robert James Date: Fri, 6 Nov 2026 04:28:38 +0000 Subject: [PATCH] ci: add nightly snapshot build (02:00 UTC schedule) Scheduled runs use -SNAPSHOT version suffix and publish to starshipos-snapshots Nexus repo instead of starshipos-releases. Push-to-master releases continue to use - suffix. Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/build.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 1246e1f5..cc66757a 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -5,9 +5,12 @@ on: branches: [master] pull_request: branches: [master] + schedule: + - cron: '0 2 * * *' # 02:00 UTC nightly snapshot env: - NEXUS: https://nexus.starshipos-f18.org/repository/starshipos-releases + NEXUS: https://nexus.starshipos-f18.org/repository/starshipos-releases + NEXUS_SNAP: https://nexus.starshipos-f18.org/repository/starshipos-snapshots jobs: build: @@ -68,9 +71,15 @@ jobs: LITHOS=$(grep 'LITHOS_VERSION\s*?=' Makefile.starkernel | head -1 | sed 's/.*= *//') SF=$(grep '^VERSION\s*?=' Makefile | head -1 | sed 's/.*= *//') SHA=$(git rev-parse --short HEAD) - echo "lithos=${LITHOS}-${SHA}" >> $GITHUB_OUTPUT - echo "sf=${SF}-${SHA}" >> $GITHUB_OUTPUT - echo "sha=${SHA}" >> $GITHUB_OUTPUT + if [ "${{ github.event_name }}" = "schedule" ]; then + SUFFIX="-SNAPSHOT" + else + SUFFIX="-${SHA}" + fi + echo "lithos=${LITHOS}${SUFFIX}" >> $GITHUB_OUTPUT + echo "sf=${SF}${SUFFIX}" >> $GITHUB_OUTPUT + echo "sha=${SHA}" >> $GITHUB_OUTPUT + echo "is_snapshot=${{ github.event_name == 'schedule' }}" >> $GITHUB_OUTPUT - name: Build StarForth VM run: make T=${{ matrix.board }} @@ -130,7 +139,7 @@ jobs: build/${{ matrix.vm_arch }}/fastest/starforth - name: Publish to Nexus - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/master' || github.event_name == 'schedule' env: NEXUS_PASS: ${{ secrets.NEXUS_CI_PASSWORD }} BOARD: ${{ matrix.board }} @@ -139,15 +148,18 @@ jobs: KVER: ${{ steps.ver.outputs.lithos }} SFVER: ${{ steps.ver.outputs.sf }} IMG_TYPE: ${{ matrix.img_type }} + IS_SNAPSHOT: ${{ steps.ver.outputs.is_snapshot }} run: | set -e + REPO="${IS_SNAPSHOT:+$NEXUS_SNAP}" + REPO="${REPO:-$NEXUS}" push() { local coord="$1" file="$2" echo "→ org.f18:${coord}" curl -fsS --retry 3 \ -u "ci-publisher:${NEXUS_PASS}" \ -H "Content-Type: application/octet-stream" \ - -X PUT "${NEXUS}/org/f18/${coord}" \ + -X PUT "${REPO}/org/f18/${coord}" \ --upload-file "$file" }