Skip to content

Commit c38351f

Browse files
Merge branch 'main' into fix/stable-source-ref
2 parents ffd2356 + bd9aeaf commit c38351f

81 files changed

Lines changed: 2060 additions & 1398 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/fetch-telemetry.yml

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
name: Fetch Telemetry Data
22

33
on:
4-
# Daily cron is paused until the telemetry-server current-month fix ships.
5-
# Until then the live /api/overview response for the current month is a
6-
# frozen first-of-month snapshot, and an automatic fetch would overwrite
7-
# the manually-corrected telemetry.json with stale numbers. Re-enable the
8-
# schedule once cozystack-telemetry-server is deployed with the fix.
9-
# schedule:
10-
# - cron: '0 8 * * *'
4+
# Keep this as a manual telemetry-only backfill path. The monthly OSS Health
5+
# refresh intentionally does not update telemetry while /api/overview differs
6+
# from the Grafana-backed source of truth.
117
workflow_dispatch:
128

139
permissions:
1410
contents: write
11+
pull-requests: write
12+
13+
concurrency:
14+
group: fetch-telemetry
15+
cancel-in-progress: false
1516

1617
jobs:
1718
fetch-telemetry:
1819
runs-on: ubuntu-latest
1920
steps:
2021
- name: Checkout repository
2122
uses: actions/checkout@v4
23+
with:
24+
ref: 'main'
2225

2326
- name: Set up Python
2427
uses: actions/setup-python@v5
@@ -43,5 +46,25 @@ jobs:
4346
git config user.name "github-actions[bot]"
4447
git config user.email "github-actions[bot]@users.noreply.github.com"
4548
git add static/oss-health-data/telemetry.json
46-
git commit -m "chore(oss-health): update telemetry snapshot"
47-
git push
49+
git branch -D update-telemetry || true
50+
git checkout -b update-telemetry
51+
git commit --signoff -m "[oss-health] Update telemetry snapshot $(date -u +'%Y-%m-%d %H:%M:%S')"
52+
git push --force --set-upstream origin update-telemetry
53+
54+
- name: Open pull request if not exists
55+
if: steps.changes.outputs.changed == 'true'
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
run: |
59+
pr_state=$(gh pr view update-telemetry --json state --jq .state 2>/dev/null || echo "")
60+
echo "Current PR state: ${pr_state:-NONE}"
61+
62+
if [[ "$pr_state" == "OPEN" ]]; then
63+
echo "An open pull request already exists – skipping creation."
64+
else
65+
gh pr create \
66+
--title "[oss-health] Update telemetry snapshot" \
67+
--body "Automated telemetry update via workflow." \
68+
--head update-telemetry \
69+
--base main
70+
fi

.github/workflows/update-oss-health.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ on:
55
schedule:
66
- cron: '0 4 1 * *'
77

8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
concurrency:
13+
group: update-oss-health
14+
cancel-in-progress: false
15+
816
jobs:
917
update-oss-health:
1018
runs-on: ubuntu-latest
@@ -28,20 +36,24 @@ jobs:
2836
git status -s
2937
3038
- name: Commit & push changes
39+
id: commit
3140
run: |
3241
git config user.name "github-actions[bot]"
3342
git config user.email "github-actions[bot]@users.noreply.github.com"
3443
git add data/oss-health static/oss-health-data content/en/oss-health
3544
if git diff --cached --quiet; then
3645
echo "No changes to commit"
46+
echo "changed=false" >> "$GITHUB_OUTPUT"
3747
exit 0
3848
fi
3949
git branch -D update-oss-health || true
4050
git checkout -b update-oss-health
4151
git commit --signoff -m "[oss-health] Update monthly OSS health snapshot $(date -u +'%Y-%m-%d %H:%M:%S')"
4252
git push --force --set-upstream origin update-oss-health
53+
echo "changed=true" >> "$GITHUB_OUTPUT"
4354
4455
- name: Open pull request if not exists
56+
if: steps.commit.outputs.changed == 'true'
4557
env:
4658
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4759
run: |

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ update-services:
9393
./hack/update_apps.sh --apps "$(SERVICES)" --dest "$(SERVICES_DEST_DIR)" --branch "$(BRANCH)" --source-ref "$(SOURCE_REF)" --pkgdir extra
9494

9595
update-oss-health:
96-
./hack/update_oss_health.py
96+
python3 hack/update_oss_health.py
9797

9898
# Download openapi.json for a specific version from GitHub release
9999
download-openapi:

assets/scss/_oss_info.scss

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
// Component cards for /operations/configuration/licenses/
2+
// Inspired by Deckhouse OSS-info layout.
3+
4+
.oss-cards-grid {
5+
display: grid;
6+
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
7+
gap: 1rem;
8+
margin: 1.5rem 0 2rem;
9+
10+
// Hugo wraps shortcode output in <p> when the parent is markdown.
11+
// Flatten that so cards sit directly in the grid.
12+
> p {
13+
display: contents;
14+
}
15+
}
16+
17+
.oss-card {
18+
display: flex;
19+
flex-direction: column;
20+
gap: .5rem;
21+
padding: 1rem 1.1rem;
22+
border: 1px solid var(--bs-gray-300, #dee2e6);
23+
border-radius: .5rem;
24+
background: var(--bs-body-bg, #fff);
25+
transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
26+
27+
&:hover {
28+
border-color: var(--bs-primary, #0d6efd);
29+
box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
30+
transform: translateY(-1px);
31+
}
32+
}
33+
34+
.oss-card-head {
35+
display: flex;
36+
align-items: center;
37+
gap: .65rem;
38+
}
39+
40+
.oss-card-logo {
41+
width: 36px;
42+
height: 36px;
43+
flex-shrink: 0;
44+
object-fit: contain;
45+
border-radius: 6px;
46+
}
47+
48+
.oss-card-logo-fallback {
49+
display: inline-flex;
50+
align-items: center;
51+
justify-content: center;
52+
font-family: var(--bs-font-monospace, ui-monospace, monospace);
53+
font-size: .8rem;
54+
font-weight: 600;
55+
letter-spacing: .02em;
56+
color: #fff;
57+
background: hsl(var(--oss-hue, 210), 55%, 45%);
58+
user-select: none;
59+
}
60+
61+
.oss-card-titleblock {
62+
display: flex;
63+
flex-direction: column;
64+
min-width: 0;
65+
}
66+
67+
.oss-card-title {
68+
font-weight: 600;
69+
font-size: 1rem;
70+
line-height: 1.25;
71+
color: inherit;
72+
text-decoration: none;
73+
word-break: break-word;
74+
75+
&:hover {
76+
color: var(--bs-primary, #0d6efd);
77+
text-decoration: underline;
78+
}
79+
}
80+
81+
.oss-card-version {
82+
font-family: var(--bs-font-monospace, ui-monospace, monospace);
83+
font-size: .8rem;
84+
color: var(--bs-secondary, #6c757d);
85+
margin-top: 1px;
86+
}
87+
88+
.oss-card-desc {
89+
margin: 0;
90+
font-size: .9rem;
91+
color: var(--bs-body-color, #212529);
92+
line-height: 1.4;
93+
}
94+
95+
.oss-card-meta {
96+
display: flex;
97+
flex-wrap: wrap;
98+
align-items: center;
99+
gap: .35rem;
100+
font-size: .82rem;
101+
color: var(--bs-secondary, #6c757d);
102+
margin-top: auto;
103+
padding-top: .25rem;
104+
}
105+
106+
.oss-card-license {
107+
font-family: var(--bs-font-monospace, ui-monospace, monospace);
108+
background: var(--bs-gray-100, #f8f9fa);
109+
border: 1px solid var(--bs-gray-200, #e9ecef);
110+
border-radius: 3px;
111+
padding: .05rem .4rem;
112+
color: var(--bs-body-color, #212529);
113+
font-size: .78rem;
114+
}
115+
116+
.oss-card-usedin {
117+
color: inherit;
118+
text-decoration: none;
119+
border-bottom: 1px dashed currentColor;
120+
121+
&:hover {
122+
color: var(--bs-primary, #0d6efd);
123+
border-bottom-style: solid;
124+
}
125+
}
126+
127+
// Dark mode (Docsy supports it via data-bs-theme="dark")
128+
[data-bs-theme="dark"] {
129+
.oss-card {
130+
border-color: var(--bs-gray-700, #495057);
131+
background: var(--bs-gray-900, #212529);
132+
}
133+
134+
.oss-card-license {
135+
background: var(--bs-gray-800, #343a40);
136+
border-color: var(--bs-gray-700, #495057);
137+
}
138+
}

assets/scss/main.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ a {
157157
@import "support";
158158
@import "ecosystem";
159159
@import "oss_health";
160+
@import "oss_info";
160161
@import "adopters_wall";
161162
@import "announcement-banner";
162163
@import "tabs_alerts";

0 commit comments

Comments
 (0)