Implementar PIPE lines CI/CD #20

Closed
opened 2026-02-12 20:14:43 +00:00 by alexrg · 1 comment
Owner

CI.yaml

name: CI

on:
  pull_request:
  workflow_dispatch:

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - uses: supabase/setup-cli@v1
        with:
          version: latest

      - name: Start Supabase local development setup
        run: supabase db start

      - name: Verify generated types are checked in
        run: |
          supabase gen types typescript --local > types.gen.ts
          if ! git diff --ignore-space-at-eol --exit-code --quiet types.gen.ts; then
            echo "Detected uncommitted changes after build. See status below:"
            git diff
            exit 1
          fi

production.yaml

name: Deploy Migrations to Production

on:
  push:
    branches:
      - main
  workflow_dispatch:

jobs:
  deploy:
    runs-on: ubuntu-latest

    env:
      SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
      SUPABASE_DB_PASSWORD: ${{ secrets.PRODUCTION_DB_PASSWORD }}
      SUPABASE_PROJECT_ID: ${{ secrets.PRODUCTION_PROJECT_ID }}

    steps:
      - uses: actions/checkout@v4

      - uses: supabase/setup-cli@v1
        with:
          version: latest

      - run: supabase link --project-ref $SUPABASE_PROJECT_ID
      - run: supabase db push
# CI.yaml ```yaml name: CI on: pull_request: workflow_dispatch: jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: supabase/setup-cli@v1 with: version: latest - name: Start Supabase local development setup run: supabase db start - name: Verify generated types are checked in run: | supabase gen types typescript --local > types.gen.ts if ! git diff --ignore-space-at-eol --exit-code --quiet types.gen.ts; then echo "Detected uncommitted changes after build. See status below:" git diff exit 1 fi ``` # production.yaml ```yaml name: Deploy Migrations to Production on: push: branches: - main workflow_dispatch: jobs: deploy: runs-on: ubuntu-latest env: SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }} SUPABASE_DB_PASSWORD: ${{ secrets.PRODUCTION_DB_PASSWORD }} SUPABASE_PROJECT_ID: ${{ secrets.PRODUCTION_PROJECT_ID }} steps: - uses: actions/checkout@v4 - uses: supabase/setup-cli@v1 with: version: latest - run: supabase link --project-ref $SUPABASE_PROJECT_ID - run: supabase db push ```
alexrg added the Kind/Feature label 2026-02-12 20:14:43 +00:00
alexrg self-assigned this 2026-02-12 20:14:43 +00:00
Author
Owner

Implementado

Implementado
Sign in to join this conversation.