Skip to content

Commit 79a8729

Browse files
authored
Cleanup build machinery (#25)
Signed-off-by: Kingdon B <kingdon@urmanac.com>
1 parent f0df0a5 commit 79a8729

2 files changed

Lines changed: 55 additions & 47 deletions

File tree

.github/workflows/build-talos-images.yml

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ on:
6363

6464
# Source: https://github.com/cozystack/cozystack/blob/main/packages/core/installer/Makefile
6565
env:
66-
REGISTRY: ghcr.io/urmanac
66+
REGISTRY: ghcr.io/urmanac/cozystack-assets
6767

6868
jobs:
6969
build-cozystack-upstream:
@@ -178,7 +178,7 @@ jobs:
178178
- name: Update upstream dependencies and build with Makefile targets
179179
id: build
180180
env:
181-
REGISTRY: ${{ env.REGISTRY }}/talos-cozystack-${{ matrix.extension_variant }}
181+
REGISTRY: ${{ env.REGISTRY }}/talos/cozystack-${{ matrix.extension_variant }}
182182
PUSH: 1
183183
LOAD: 0
184184
run: |
@@ -367,14 +367,26 @@ jobs:
367367
EOF
368368
369369
# Output validation results
370-
if [ -f "boot/vmlinuz" ]; then
370+
if [ -f "usr/install/arm64/vmlinuz.efi" ]; then
371+
KERNEL_DIGEST=$(sha256sum usr/install/arm64/vmlinuz.efi | cut -d' ' -f1)
372+
echo "kernel-digest=$KERNEL_DIGEST" >> $GITHUB_OUTPUT
373+
elif [ -f "talos/arm64/boot/vmlinuz" ]; then
374+
KERNEL_DIGEST=$(sha256sum talos/arm64/boot/vmlinuz | cut -d' ' -f1)
375+
echo "kernel-digest=$KERNEL_DIGEST" >> $GITHUB_OUTPUT
376+
elif [ -f "boot/vmlinuz" ]; then
371377
KERNEL_DIGEST=$(sha256sum boot/vmlinuz | cut -d' ' -f1)
372-
echo "kernel-digest=sha256:$KERNEL_DIGEST" >> $GITHUB_OUTPUT
378+
echo "kernel-digest=$KERNEL_DIGEST" >> $GITHUB_OUTPUT
373379
fi
374380
375-
if [ -f "boot/initramfs.xz" ]; then
381+
if [ -f "usr/install/arm64/systemd-boot.efi" ]; then
382+
INITRAMFS_DIGEST=$(sha256sum usr/install/arm64/systemd-boot.efi | cut -d' ' -f1)
383+
echo "initramfs-digest=$INITRAMFS_DIGEST" >> $GITHUB_OUTPUT
384+
elif [ -f "talos/arm64/boot/initramfs.xz" ]; then
385+
INITRAMFS_DIGEST=$(sha256sum talos/arm64/boot/initramfs.xz | cut -d' ' -f1)
386+
echo "initramfs-digest=$INITRAMFS_DIGEST" >> $GITHUB_OUTPUT
387+
elif [ -f "boot/initramfs.xz" ]; then
376388
INITRAMFS_DIGEST=$(sha256sum boot/initramfs.xz | cut -d' ' -f1)
377-
echo "initramfs-digest=sha256:$INITRAMFS_DIGEST" >> $GITHUB_OUTPUT
389+
echo "initramfs-digest=$INITRAMFS_DIGEST" >> $GITHUB_OUTPUT
378390
fi
379391
380392
echo "asset-count=$ASSET_COUNT" >> $GITHUB_OUTPUT
@@ -411,7 +423,7 @@ jobs:
411423
# Only test container images (not OS filesystem images like Talos)
412424
if [[ "$BUILD_OUTPUTS" == *"matchbox"* ]]; then
413425
echo "🔍 Testing matchbox container image architecture and functionality..."
414-
MATCHBOX_IMAGE="${{ env.REGISTRY }}/matchbox:latest"
426+
MATCHBOX_IMAGE="${{ env.REGISTRY }}/matchbox/cozystack-${{ matrix.extension_variant }}:latest"
415427
416428
# First check if the image actually exists
417429
echo "Checking if matchbox image exists in registry..."
@@ -491,7 +503,7 @@ jobs:
491503
id: meta
492504
uses: docker/metadata-action@v5
493505
with:
494-
images: ${{ env.REGISTRY }}/talos-cozystack-${{ matrix.extension_variant }}
506+
images: ${{ env.REGISTRY }}/talos/cozystack-${{ matrix.extension_variant }}
495507
tags: |
496508
# Clean Talos version (variant is in repo name now)
497509
type=raw,value=${{ steps.build.outputs.talos-version }}
@@ -591,9 +603,9 @@ jobs:
591603
VARIANT="${{ matrix.extension_variant }}"
592604
REGISTRY="${{ env.REGISTRY }}"
593605
594-
# Test the talos repository (correct path with /talos suffix)
606+
# Test the talos repository (correct path with new hierarchy)
595607
echo "Testing $VARIANT variant..."
596-
TALOS_REPO="$REGISTRY/talos-cozystack-$VARIANT/talos"
608+
TALOS_REPO="$REGISTRY/talos/cozystack-$VARIANT"
597609
598610
echo "Checking for available tags in: $TALOS_REPO"
599611
if crane ls "$TALOS_REPO" 2>/dev/null; then
@@ -698,46 +710,44 @@ jobs:
698710
699711
| Asset | Digest |
700712
|-------|--------|
701-
| **Kernel** | \`${KERNEL_DIGEST:-'pending'}\` |
702-
| **Initramfs** | \`${INITRAMFS_DIGEST:-'pending'}\` |
713+
| **Kernel** | \`${KERNEL_DIGEST:-'not found'}\` |
714+
| **Boot Loader** | \`${INITRAMFS_DIGEST:-'not found'}\` |
703715
704716
## Container Images
705717
706718
Two variants are built for different use cases:
707719
708-
### spin-tailscale (Full Stack)
720+
### talos/cozystack-spin-tailscale (Full Stack)
709721
Includes Spin runtime + Tailscale networking for complete demo environment.
710722
711723
\`\`\`bash
712-
docker pull ${{ env.REGISTRY }}/talos-cozystack-spin-tailscale:demo-stable
724+
docker pull ${{ env.REGISTRY }}/talos/cozystack-spin-tailscale:demo-stable
713725
\`\`\`
714726
715-
### spin-only (Minimal)
727+
### talos/cozystack-spin-only (Minimal)
716728
Includes only Spin runtime for lightweight deployments.
717729
718730
\`\`\`bash
719-
docker pull ${{ env.REGISTRY }}/talos-cozystack-spin-only:demo-stable
731+
docker pull ${{ env.REGISTRY }}/talos/cozystack-spin-only:demo-stable
720732
\`\`\`
721733
722734
## Asset Extraction
723735
724-
Extract complete ARM64 asset bundle with validation:
736+
Extract complete Talos installer assets:
725737
726738
\`\`\`bash
727-
# Create asset directory
728-
mkdir -p /opt/cozystack-assets
739+
# Create local assets directory
740+
mkdir -p ./cozystack-assets
729741
730-
# Extract from spin-tailscale image
731-
docker create --name temp-extract ${{ env.REGISTRY }}/talos-cozystack-spin-tailscale:demo-stable
732-
docker cp temp-extract:/assets/. /opt/cozystack-assets/
742+
# Extract from talos/cozystack-spin-tailscale image (recommended)
743+
docker create --name temp-extract ${{ env.REGISTRY }}/talos/cozystack-spin-tailscale:demo-stable
744+
docker cp temp-extract:/. ./cozystack-assets
733745
docker rm temp-extract
734746
735-
# Verify integrity
736-
cd /opt/cozystack-assets/talos/arm64
737-
sha256sum -c checksums.sha256
738-
739-
# View build report
740-
cat validation/build-report.txt
747+
# Key assets are located at:
748+
# ./cozystack-assets/usr/install/arm64/vmlinuz.efi
749+
# ./cozystack-assets/usr/install/arm64/systemd-boot.efi
750+
# ./cozystack-assets/usr/bin/installer
741751
\`\`\`
742752
EOF
743753

docs/LATEST-BUILD.md

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,50 @@
22

33
**Built:** 2025-11-20 14:08:37 UTC
44
**Talos Version:** `v1.11.5`
5-
**CozyStack Commit:** ``
5+
**CozyStack Commit:** `pending`
66
**Build Target:** `upstream-images`
77
**Total Assets:** 2
88

99
## Asset Digests
1010

1111
| Asset | Digest |
1212
|-------|--------|
13-
| **Kernel** | `'pending'` |
14-
| **Initramfs** | `'pending'` |
13+
| **Kernel** | `not found` |
14+
| **Boot Loader** | `not found` |
1515

1616
## Container Images
1717

1818
Two variants are built for different use cases:
1919

20-
### spin-tailscale (Full Stack)
20+
### talos/cozystack-spin-tailscale (Full Stack)
2121
Includes Spin runtime + Tailscale networking for complete demo environment.
2222

2323
```bash
24-
docker pull ghcr.io/urmanac/talos-cozystack-spin-tailscale:demo-stable
24+
docker pull ghcr.io/urmanac/cozystack-assets/talos/cozystack-spin-tailscale:demo-stable
2525
```
2626

27-
### spin-only (Minimal)
27+
### talos/cozystack-spin-only (Minimal)
2828
Includes only Spin runtime for lightweight deployments.
2929

3030
```bash
31-
docker pull ghcr.io/urmanac/talos-cozystack-spin-only:demo-stable
31+
docker pull ghcr.io/urmanac/cozystack-assets/talos/cozystack-spin-only:demo-stable
3232
```
3333

3434
## Asset Extraction
3535

36-
Extract complete ARM64 asset bundle with validation:
36+
Extract complete Talos installer assets:
3737

3838
```bash
39-
# Create asset directory
40-
mkdir -p /opt/cozystack-assets
39+
# Create local assets directory
40+
mkdir -p ./cozystack-assets
4141

42-
# Extract from spin-tailscale image
43-
docker create --name temp-extract ghcr.io/urmanac/talos-cozystack-spin-tailscale:demo-stable
44-
docker cp temp-extract:/assets/. /opt/cozystack-assets/
42+
# Extract from talos/cozystack-spin-tailscale image (recommended)
43+
docker create --name temp-extract ghcr.io/urmanac/cozystack-assets/talos/cozystack-spin-tailscale:demo-stable
44+
docker cp temp-extract:/. ./cozystack-assets
4545
docker rm temp-extract
4646

47-
# Verify integrity
48-
cd /opt/cozystack-assets/talos/arm64
49-
sha256sum -c checksums.sha256
50-
51-
# View build report
52-
cat validation/build-report.txt
47+
# Key assets are located at:
48+
# ./cozystack-assets/usr/install/arm64/vmlinuz.efi
49+
# ./cozystack-assets/usr/install/arm64/systemd-boot.efi
50+
# ./cozystack-assets/usr/bin/installer
5351
```

0 commit comments

Comments
 (0)