fix(desktop): honor minimizeOnLaunch on auto-start (#115) #32
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Self-Hosted Web | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| on: | |
| pull_request: | |
| paths: | |
| - "apps/web/**" | |
| - "packages/db/**" | |
| - "packages/shared/**" | |
| - "pnpm-lock.yaml" | |
| - ".github/workflows/web-self-hosted.yml" | |
| - ".github/workflows/quality.yml" | |
| push: | |
| tags: | |
| - "web-v*" | |
| workflow_dispatch: | |
| jobs: | |
| verify: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| 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@v4 | |
| 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 | |
| run: pnpm verify:web | |
| - 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@v4 | |
| - 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=match,pattern=web-v(.*),group=1 | |
| type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/web-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@v4 | |
| with: | |
| name: prompthub-web-image-${{ github.ref_name }} | |
| path: prompthub-web-${{ github.ref_name }}.tar.gz |