Skip to content

Commit e418051

Browse files
committed
fix: resolve hub CI failures
- og.ts: use SatoriNode type instead of unknown for satori() param - Pin all GitHub Action refs to commit SHAs (validate-pins) - Add vercel to knip ignoreBinaries (hub-preview-cron uses npx vercel)
1 parent d92acd8 commit e418051

7 files changed

Lines changed: 16 additions & 16 deletions

File tree

.github/workflows/hub-ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
SKIP_AI_GENERATION: 'true'
6565

6666
- name: Upload build artifact
67-
uses: actions/upload-artifact@v4
67+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6868
with:
6969
name: hub-build
7070
path: apps/hub/dist
@@ -85,7 +85,7 @@ jobs:
8585
uses: ./.github/actions/setup-frontend
8686

8787
- name: Download build artifact
88-
uses: actions/download-artifact@v4
88+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
8989
with:
9090
name: hub-build
9191
path: apps/hub/dist
@@ -172,7 +172,7 @@ jobs:
172172
173173
- name: Upload SEO reports
174174
if: always()
175-
uses: actions/upload-artifact@v4
175+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
176176
with:
177177
name: hub-seo-reports
178178
path: |

.github/workflows/hub-cron-rebuild.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
token: ${{ secrets.GH_TOKEN }}
3838

3939
- name: Restore content cache
40-
uses: actions/cache@v4
40+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
4141
with:
4242
path: apps/hub/.content-cache
4343
key: hub-content-cache-cron-prod-${{ hashFiles('_workflow_templates/templates/**', 'apps/hub/src/**') }}
@@ -59,7 +59,7 @@ jobs:
5959
PUBLIC_APPROVED_ONLY: 'true'
6060

6161
- name: Deploy to Vercel
62-
uses: amondnet/vercel-action@v25
62+
uses: amondnet/vercel-action@16e87c0a08142b0d0d33b76aeaf20823c381b9b9 # v25.2.0
6363
with:
6464
vercel-token: ${{ secrets.VERCEL_TOKEN }}
6565
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}

.github/workflows/hub-deploy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
token: ${{ secrets.GH_TOKEN }}
5050

5151
- name: Restore content cache
52-
uses: actions/cache@v4
52+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
5353
with:
5454
path: apps/hub/.content-cache
5555
key: hub-content-cache-${{ hashFiles('_workflow_templates/templates/**', 'apps/hub/src/**') }}
@@ -71,7 +71,7 @@ jobs:
7171
PUBLIC_APPROVED_ONLY: 'true'
7272

7373
- name: Deploy to Vercel
74-
uses: amondnet/vercel-action@v25
74+
uses: amondnet/vercel-action@16e87c0a08142b0d0d33b76aeaf20823c381b9b9 # v25.2.0
7575
with:
7676
vercel-token: ${{ secrets.VERCEL_TOKEN }}
7777
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}

.github/workflows/hub-preview-cron.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
token: ${{ secrets.GH_TOKEN }}
7474

7575
- name: Restore content cache
76-
uses: actions/cache@v4
76+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
7777
with:
7878
path: apps/hub/.content-cache
7979
key: hub-content-cache-cron-${{ matrix.ref }}-${{ matrix.api_env }}-${{ hashFiles('_workflow_templates/templates/**', 'apps/hub/src/**') }}
@@ -95,7 +95,7 @@ jobs:
9595

9696
- name: Deploy to Vercel
9797
id: deploy
98-
uses: amondnet/vercel-action@v25
98+
uses: amondnet/vercel-action@16e87c0a08142b0d0d33b76aeaf20823c381b9b9 # v25.2.0
9999
with:
100100
vercel-token: ${{ secrets.VERCEL_TOKEN }}
101101
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
@@ -125,7 +125,7 @@ jobs:
125125
126126
- name: Comment preview URL on PR
127127
if: matrix.pr > 0
128-
uses: marocchino/sticky-pull-request-comment@v2
128+
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
129129
with:
130130
number: ${{ matrix.pr }}
131131
header: hub-preview-cron

.github/workflows/hub-preview.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
token: ${{ secrets.GH_TOKEN }}
3636

3737
- name: Restore content cache
38-
uses: actions/cache@v4
38+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
3939
with:
4040
path: apps/hub/.content-cache
4141
key: hub-content-cache-preview-${{ hashFiles('_workflow_templates/templates/**', 'apps/hub/src/**') }}
@@ -57,7 +57,7 @@ jobs:
5757

5858
- name: Deploy preview to Vercel
5959
id: deploy
60-
uses: amondnet/vercel-action@v25
60+
uses: amondnet/vercel-action@16e87c0a08142b0d0d33b76aeaf20823c381b9b9 # v25.2.0
6161
with:
6262
vercel-token: ${{ secrets.VERCEL_TOKEN }}
6363
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
@@ -67,7 +67,7 @@ jobs:
6767

6868
- name: Comment preview URL
6969
if: github.event_name == 'pull_request'
70-
uses: marocchino/sticky-pull-request-comment@v2
70+
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
7171
with:
7272
header: hub-vercel-preview
7373
message: |

apps/hub/src/lib/og.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import satori from 'satori'
22
import { Resvg } from '@resvg/resvg-js'
33
import sharp from 'sharp'
4-
import type { SatoriOptions } from 'satori'
4+
import type { SatoriOptions, SatoriNode } from 'satori'
55

66
const WIDTH = 1200
77
const HEIGHT = 630
@@ -267,7 +267,7 @@ function creatorLayout(
267267
}
268268
}
269269

270-
export async function renderOgPng(layout: unknown): Promise<Uint8Array> {
270+
export async function renderOgPng(layout: SatoriNode): Promise<Uint8Array> {
271271
const fonts = await loadFonts()
272272
const svg = await satori(layout, {
273273
width: WIDTH,

knip.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const config: KnipConfig = {
6060
]
6161
}
6262
},
63-
ignoreBinaries: ['python3'],
63+
ignoreBinaries: ['python3', 'vercel'],
6464
ignoreDependencies: [
6565
// Weird importmap things
6666
'@iconify-json/lucide',

0 commit comments

Comments
 (0)