chore(ci): fix missing RPi Imager JSON URL (#2350)

This commit is contained in:
Nico Miguelino
2025-06-18 10:02:18 -07:00
committed by GitHub
parent 7d36d49f12
commit 2356c6568c
3 changed files with 20 additions and 6 deletions

View File

@@ -33,12 +33,25 @@ jobs:
- name: Setup Pages
uses: actions/configure-pages@v5
- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip'
- run: pip install requests==2.32.3
- name: Build website
run: |
cd website
mkdir -p _site
# Copy in static files. This is to be migrated to Hugo later.
# Build Raspberry Pi Imager JSON
python ../raspberry_pi_imager/bin/build-pi-imager-json.py > _site/rpi-imager.json
# Make sure it's valid
jq . < _site/rpi-imager.json
# Copy in static files.
cp -rf assets _site/
cp index.html _site/

View File

@@ -30,15 +30,16 @@ def get_asset_list(release_tag):
)
for url in response.json()['assets']:
if url['browser_download_url'].endswith('.zip'):
asset_urls.append(url['browser_download_url'])
download_url = url['browser_download_url']
if download_url.endswith('.zst'):
asset_urls.append(download_url)
return asset_urls
def retrieve_and_patch_json(url):
image_json = requests.get(
url.replace('.zip', '.json'),
url.replace('.img.zst', '.json'),
headers=GITHUB_HEADERS
).json()

View File

@@ -8,7 +8,7 @@ To run the website locally:
```bash
# Start the development server
docker-compose -f docker-compose.website.yml up --build
docker compose -f docker-compose.website.yml up --build
# The website will be available at:
# http://localhost:8080
@@ -21,4 +21,4 @@ website/
├── assets/ # Static assets (images, styles)
├── docker-compose.website.yml # Docker Compose file for local development
└── index.html # Main website content
```
```