From d319c1d4be754dd93848dd9d2098de94d0980fa7 Mon Sep 17 00:00:00 2001 From: shocknet-justin Date: Mon, 17 Nov 2025 00:04:02 -0500 Subject: [PATCH] start9 action --- .github/workflows/push.yml | 39 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index e70e0e3d..d9440569 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -24,6 +24,12 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Log in to the Container registry uses: docker/login-action@v2 with: @@ -50,6 +56,7 @@ jobs: context: . file: ./Dockerfile push: true + platforms: linux/amd64,linux/arm64 tags: | ghcr.io/${{ github.repository_owner }}/lightning-pub:latest ghcr.io/${{ github.repository_owner }}/lightning-pub:master @@ -58,8 +65,9 @@ jobs: - name: Capture image digest id: capture-digest run: | - DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' ghcr.io/${{ github.repository_owner }}/lightning-pub:latest | cut -d'@' -f2) - echo "Raw Digest is $DIGEST" + # For multi-arch builds, use the digest from build output + DIGEST="${{ steps.build-and-push.outputs.digest }}" + echo "Multi-arch manifest digest: $DIGEST" echo "digest=$DIGEST" >> $GITHUB_OUTPUT - name: Debug Print Digest @@ -71,3 +79,30 @@ jobs: subject-digest: ${{ steps.capture-digest.outputs.digest }} subject-name: ghcr.io/${{ github.repository_owner }}/lightning-pub push-to-registry: true + + - name: Trigger StartOS package build + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' + env: + STARTOS_BUILD_TRIGGER: ${{ secrets.STARTOS_BUILD_TRIGGER }} + run: | + if [ -z "$STARTOS_BUILD_TRIGGER" ]; then + echo "⚠️ STARTOS_BUILD_TRIGGER not configured, skipping StartOS build trigger" + exit 0 + fi + + echo "🚀 Triggering StartOS package build with digest: ${{ steps.capture-digest.outputs.digest }}" + + curl -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $STARTOS_BUILD_TRIGGER" \ + https://api.github.com/repos/shocknet/start9-LightningPub/dispatches \ + -d "{ + \"event_type\": \"docker-image-updated\", + \"client_payload\": { + \"docker_tag\": \"latest\", + \"digest\": \"${{ steps.capture-digest.outputs.digest }}\", + \"commit\": \"${{ github.sha }}\" + } + }" + + echo "✓ StartOS build triggered" \ No newline at end of file