Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
51 changes: 51 additions & 0 deletions .github/workflows/archive_historic_releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Archive Historic Releases

on:
schedule:
# Run nightly at 2 AM UTC
- cron: "0 2 * * *"
workflow_dispatch: # Allow manual triggering

jobs:
archive:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install dependencies
run: npm ci

- name: Collect historic release data
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
node scripts/collect-historic.js --days 14 --start-from-yesterday

- name: Checkout historic-releases branch
run: |
git fetch origin
git checkout -B historic-releases origin/historic-releases || git checkout -b historic-releases

- name: Commit and push historic data
run: |
git config user.email "release_historian@gardenlinux.io"
git config user.name "release_historian"

if [ -n "$(git status --porcelain historic/)" ]; then
git add historic/
git commit -m "Archive historic release data for last 14 days (starting from yesterday)"
git push origin historic-releases
else
echo "No changes to commit"
fi
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- name: Build dashboard
run: |
npm run packages
npm run historic
npm run build
env:
NODE_ENV: production
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
_site
.cache
.venv
shell.nix
vendor
Expand All @@ -15,3 +16,6 @@ dist/

# packages are in packages branch
packages/

# historic releases are in historic-releases branch
historic/
148 changes: 130 additions & 18 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ <h3>GitHub Authentication</h3>

<h3>Historic Daily Releases</h3>
<div class="gl-selector">
<small class="gl-description">
Navigate to a specific Garden Linux version to view its
daily release status, workflow runs, and package build
information. Enter a version number below and click "Go
to Version" to view that release.
</small>
<label for="gl-input">Garden Linux Version:</label>
<div class="gl-input-group">
<button class="gl-btn" onclick="decrementGL()">
Expand All @@ -65,7 +71,6 @@ <h3>Historic Daily Releases</h3>
id="gl-input"
min="1"
step="1"
onchange="goToGL()"
onkeypress="handleGLKeypress(event)"
oninput="handleGLInput()"
/>
Expand All @@ -77,14 +82,83 @@ <h3>Historic Daily Releases</h3>
<small id="gl-date-info">Loading...</small>
</div>
<div class="gl-actions">
<button onclick="goToToday()" class="today-btn">
<button onclick="goToGL()" class="today-btn">
Go to Version
</button>
<button
onclick="goToToday()"
class="today-btn"
style="margin-top: 8px"
>
Go to Today
</button>
</div>
</div>

<hr class="settings-separator" />

<h3>Historic Releases Settings</h3>
<div class="historic-count-settings">
<div class="historic-count-group">
<label for="historic-count-input"
>Number of historic releases to show:</label
>
<div class="historic-count-input-group">
<input
type="number"
id="historic-count-input"
min="1"
max="2000"
step="1"
value="14"
onchange="updateHistoricCount()"
onkeypress="handleHistoricCountKeypress(event)"
/>
<button
onclick="updateHistoricCount()"
class="gl-btn"
>
Apply
</button>
</div>
<div class="historic-count-info">
<small id="historic-count-info"
>Default: 14 days</small
>
</div>
</div>
<small class="historic-count-help">
Set how many historic daily releases to display in the
historic releases section.
<br />
The value will be saved as a URL parameter and can be
shared.
</small>
</div>

<hr class="settings-separator" />

<h3>Cache Settings</h3>
<div class="branch-settings">
<div class="branch-toggle-group">
<label for="force-cache" class="branch-toggle-label">
<input
type="checkbox"
id="force-cache"
onchange="toggleForceCache()"
/>
Disable historic cache (force live GitHub API)
</label>
<small class="branch-help">
When enabled, the dashboard ignores cached historic
data and always fetches it directly from GitHub.
This can be slower and may hit API rate limits.
</small>
</div>
</div>

<hr class="settings-separator" />

<h3>Workflow Branch Settings</h3>
<div class="branch-settings">
<div class="branch-toggle-group">
Expand Down Expand Up @@ -163,26 +237,64 @@ <h2>🚀 Current Daily Release</h2>
class="current-stages"
title="Stages: Package | Repo | Build | Publish"
>
<span
class="current-stage-dot unknown"
id="current-stage-1"
<div
class="current-stage-dot-container"
title="Package Builds"
></span>
<span
class="current-stage-dot unknown"
id="current-stage-2"
>
<span
class="current-stage-dot unknown"
id="current-stage-1"
title="Package Builds"
></span>
</div>
<div
class="current-stage-dots-stacked"
id="current-stage-2-container"
title="Repository"
></span>
<span
class="current-stage-dot unknown"
id="current-stage-3"
>
<span
class="current-stage-dot unknown"
id="current-stage-2-top"
title="Repo Update"
></span>
<span
class="current-stage-dot unknown"
id="current-stage-2-bottom"
title="Repo Build"
></span>
</div>
<div
class="current-stage-dots-stacked"
id="current-stage-3-container"
title="Build & Release"
></span>
<span
class="current-stage-dot unknown"
id="current-stage-4"
>
<span
class="current-stage-dot unknown"
id="current-stage-3-top"
title="Garden Linux Nightly - Schedule"
></span>
<span
class="current-stage-dot unknown"
id="current-stage-3-bottom"
title="Build and publish a release - Manual"
></span>
</div>
<div
class="current-stage-dots-stacked"
id="current-stage-4-container"
title="Publish"
></span>
>
<span
class="current-stage-dot unknown"
id="current-stage-4-top"
title="Publish to ghcr.io"
></span>
<span
class="current-stage-dot unknown"
id="current-stage-4-bottom"
title="Publish to S3"
></span>
</div>
</div>

<div
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
"type": "module",
"main": "dist/dashboard.js",
"scripts": {
"packages": "git fetch origin && git checkout origin/packages packages",
"packages": "git fetch origin && git checkout origin/packages packages && git restore --staged packages",
"historic": "git fetch origin && git checkout origin/historic-releases historic && git restore --staged historic",
"historic:collect": "node scripts/collect-historic.js --days 14",
"build": "rollup -c",
"dev": "rollup -c -w",
"serve": "npm run packages && python3 -m http.server 8000",
"serve": "npm run packages && npm run historic && python3 -m http.server 8000",
"start": "npm run build && npm run serve",
"lint": "npm run lint:js; npm run lint:format",
"lint:js": "eslint src/**/*.js",
Expand Down
Loading