Skip to content

fix(release): enable Linux E2E secret storage #55

fix(release): enable Linux E2E secret storage

fix(release): enable Linux E2E secret storage #55

Workflow file for this run

name: Self-Hosted Web
on:
pull_request:
paths:
- "apps/web/**"
- "packages/db/**"
- "packages/core/**"
- "packages/shared/**"
- "pnpm-lock.yaml"
- ".github/workflows/web-self-hosted.yml"
- ".github/workflows/quality.yml"
push:
tags:
- "v*"
workflow_dispatch:
jobs:
verify:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
version: 9.15.0
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
- name: Setup pnpm cache
uses: actions/cache@v5
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Verify self-hosted web
env:
JWT_SECRET: test-secret-for-web-ci-verify-1234567890
run: node --experimental-strip-types scripts/verify-release.mts --profile release --surface web-self-hosted --exclude-layer governance --exclude-layer e2e
- name: Validate Docker Compose
working-directory: apps/web
run: |
cp .env.example .env
docker compose config > /tmp/prompthub-web-compose.yaml
docker compose -f docker-compose.yml -f docker-compose.ghcr.yml config > /tmp/prompthub-web-compose-ghcr.yaml
docker:
runs-on: ubuntu-latest
needs: verify
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Generate Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/prompthub-web
tags: |
type=semver,pattern={{version}}
type=semver,pattern=v{{version}}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
type=ref,event=tag
type=sha
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build self-hosted web image
uses: docker/build-push-action@v6
with:
context: .
file: apps/web/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Export Docker image archive
if: startsWith(github.ref, 'refs/tags/')
run: docker pull ghcr.io/${{ github.repository_owner }}/prompthub-web:${{ github.ref_name }} && docker save ghcr.io/${{ github.repository_owner }}/prompthub-web:${{ github.ref_name }} | gzip > prompthub-web-${{ github.ref_name }}.tar.gz
- name: Upload Docker image archive
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v6
with:
name: prompthub-web-image-${{ github.ref_name }}
path: prompthub-web-${{ github.ref_name }}.tar.gz