hasura / hasura-cloud-preview-apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pushing to the same branch/PR again fails

rohitnick opened this issue · comments

Pushing to the same branch/PR again after being done with review fixes fails with the message
Error: Could not create ephemeral database(s). database <database_name> is being accessed by other users

I have a separate delete action but that only runs on PR close as suggested by docs.

Workflow File

on:
  pull_request:

jobs:
  preview:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: hasura/hasura-cloud-preview-apps@v0.1.5
        with:
          name: "preview-${{github.env.GITHUB_HEAD_REF}}${{github.event.number}}"
          postgresDBConfig: |
            POSTGRES_SERVER_CONNECTION_URI=${{secrets.POSTGRES_SERVER_CONNECTION_URI}}
            PG_ENV_VARS_FOR_HASURA=HASURA_GRAPHQL_DATABASE_URL
          hasuraProjectDirectoryPath: /hasura # path to the Hasura project directory in the repo
          region: us-west-1
          tier: cloud_free
          hasuraEnv: | # env vars exposed to the Hasura instance
            HASURA_GRAPHQL_UNAUTHORIZED_ROLE=anonymous
        env:
          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} # ${{ secrets.GITHUB_TOKEN }} is provided by default by GitHub actions
          HASURA_CLOUD_ACCESS_TOKEN: ${{secrets.HASURA_CLOUD_ACCESS_TOKEN}} # Hasura Cloud access

Please help fix this as soon as possible.
CleanShot 2022-05-31 at 08 47 52@2x