From 9dc9d143005cbbbb939710c2b919979caedae938 Mon Sep 17 00:00:00 2001 From: istarkov Date: Tue, 30 Apr 2024 22:30:59 +0300 Subject: [PATCH] build: Migrate --- .github/actions/migrate/action.yaml | 18 ++++++++++++++++++ .github/workflows/migrate.yaml | 20 ++++++++++++++++++++ .gitignore | 3 +++ packages/prisma-client/.gitignore | 2 +- 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 .github/actions/migrate/action.yaml create mode 100644 .github/workflows/migrate.yaml diff --git a/.github/actions/migrate/action.yaml b/.github/actions/migrate/action.yaml new file mode 100644 index 000000000000..0b58841cc46c --- /dev/null +++ b/.github/actions/migrate/action.yaml @@ -0,0 +1,18 @@ +name: "MIGRATION" +description: "Builds and deploy vercel project" + +inputs: + TEST_SECRET: + description: "TEST_SECRET for migrations" + required: true + +runs: + using: "composite" + steps: + - id: branch + run: | + echo "env: -${TEST_SECRET}-" + echo "env: -${{ inputs.TEST_SECRET }}-" + shell: bash + env: + TEST_SECRET: ${{ secrets.TEST_SECRET }} diff --git a/.github/workflows/migrate.yaml b/.github/workflows/migrate.yaml new file mode 100644 index 000000000000..eaf5f57c84a3 --- /dev/null +++ b/.github/workflows/migrate.yaml @@ -0,0 +1,20 @@ +name: Migrate + +on: + push: + branches: + - "migrate" + +jobs: + migrate: + runs-on: ubuntu-latest + + environment: + name: "postgres_development" + + steps: + - uses: ./.github/actions/migrate + id: migrate + name: Migrate + with: + TEST_SECRET: ${{ secrets.TEST_SECRET }} diff --git a/.gitignore b/.gitignore index 391ae908a843..729fb8c0ba91 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,6 @@ tsconfig.tsbuildinfo # wrangler builds dist + +# should be here otherwise if placed inside prisma-client pnpm deploy doesn't copy it +packages/prisma-client/src/__generated__ \ No newline at end of file diff --git a/packages/prisma-client/.gitignore b/packages/prisma-client/.gitignore index 1156b277ce82..8b137891791f 100644 --- a/packages/prisma-client/.gitignore +++ b/packages/prisma-client/.gitignore @@ -1 +1 @@ -src/__generated__ +