Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GitHub Actions run by setting DATABASE_URL environment variable #7

Closed
wants to merge 3 commits into from

Conversation

sweep-ai[bot]
Copy link

@sweep-ai sweep-ai bot commented Dec 26, 2023

PR Feedback (click)

  • 👍 Sweep Did Well
  • 👎 Sweep Needs Improvement

I created this PR to address this rule:

"None"

Description

This PR fixes the GitHub Actions run failure due to the absence of the DATABASE_URL in the environment. The issue was occurring when the pnpm turbo run checkAndReportChatsUsage command was executed, which depends on the @typebot.io/prisma#db:generate command. The db:generate command uses the dotenv module to load environment variables from .env files, but the DATABASE_URL was not found in the environment, causing the command to fail.

The fix involves setting the DATABASE_URL as an environment variable in the GitHub Actions workflow file. This is achieved by fetching the DATABASE_URL from the secrets of the GitHub repository and setting it in the env field of the step where the pnpm turbo run checkAndReportChatsUsage command is executed.

Summary of Changes

  • Modified the GitHub Actions workflow file (.github/workflows/main.yml) to include the DATABASE_URL as an environment variable in the step where the pnpm turbo run checkAndReportChatsUsage command is executed.
  • The DATABASE_URL is fetched from the secrets of the GitHub repository using the ${{ secrets.DATABASE_URL }} syntax.

With these changes, the DATABASE_URL will be available in the environment when the GitHub Actions run is executed, allowing the @typebot.io/prisma#db:generate command to run successfully.

Copy link
Author

sweep-ai bot commented Dec 26, 2023

Rollback Files For Sweep

  • Rollback changes to .github/workflows/main.yml

Copy link

vercel bot commented Dec 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
toolzzchat-builder 🛑 Canceled (Inspect) Dec 26, 2023 7:31am
toolzzchat-builder-landing-page ❌ Failed (Inspect) Dec 26, 2023 7:31am
toolzzchat-builder-viewer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 26, 2023 7:31am

Copy link
Author

sweep-ai bot commented Dec 26, 2023

Sandbox Executions

@sweep-ai sweep-ai bot added the sweep label Dec 26, 2023
Copy link
Author

sweep-ai bot commented Dec 26, 2023

The command:
Run pnpm install
yielded the following error:
##[error]Process completed with exit code 127.
Here are the logs:

/home/runner/work/_temp/caa00b09-2ced-4433-aa45-ace85c84e908.sh: line 1: pnpm: command not found

Copy link
Author

sweep-ai bot commented Dec 26, 2023

🚀 Wrote Changes

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant