From 7642a3c42c8889b62a4706963bae199164b0cfb9 Mon Sep 17 00:00:00 2001 From: nael Date: Wed, 1 Nov 2023 19:48:00 +0100 Subject: [PATCH] feat: fix --- .github/workflows/update_prisma_schema.yml | 76 ---------------------- 1 file changed, 76 deletions(-) delete mode 100644 .github/workflows/update_prisma_schema.yml diff --git a/.github/workflows/update_prisma_schema.yml b/.github/workflows/update_prisma_schema.yml deleted file mode 100644 index f29f86999..000000000 --- a/.github/workflows/update_prisma_schema.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: Update Prisma Schema - -on: - push: - branches: - - main - #schedule: - # Runs every 30 minutes - #- cron: "*/2 * * * *" - -jobs: - update-schema: - permissions: - contents: write - issues: write - pull-requests: write - - env: - DATABASE_URL: ${{ secrets.DATABASE_URL }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - runs-on: ubuntu-latest - steps: - - name: Check out the repository - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: "16" - - - name: Install pnpm - run: npm install -g pnpm - - - name: Install dependencies - run: pnpm --recursive install --no-frozen-lockfile - - - name: Update Prisma Schema - run: npx prisma db pull - working-directory: packages/api - - - name: Regenerate Prisma Client - run: npx prisma generate - working-directory: packages/api - - - name: Check if there are changes - id: git-check - run: | - git diff --exit-code || echo "::set-output name=changes_detected::true" - - - name: Commit changes - if: steps.git-check.outputs.changes_detected == 'true' - run: | - git config --global user.name 'Panora-Prisma Updates Bot' - git add . - git commit -m "Update Prisma schema" - - - name: Create Pull Request - if: steps.git-check.outputs.changes_detected == 'true' - uses: peter-evans/create-pull-request@v4 - with: - token: ${{ secrets.GH_TOKEN }} - commit-message: Update Prisma schema - title: "chore: Update Prisma schema" - body: "This PR was auto-generated by GitHub Actions & Panora-Prisma." - branch: "update-prisma-schema-${{ github.run_id }}" - - - name: Auto-merge Pull Request - if: steps.git-check.outputs.changes_detected == 'true' - uses: pascalgn/automerge-action@v0.14.3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - mergeMethod: squash - commitMessage: "chore: Update Prisma schema" - pullRequestFilterLabels: "auto-merge" - requiredLabels: "auto-merge"