[FEAT] Created Password Reset Page #11
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Cleanup Database Branch | |
| on: | |
| pull_request: | |
| types: | |
| - closed | |
| workflow_dispatch: | |
| inputs: | |
| pr_number: | |
| description: "Pull Request Number" | |
| required: false | |
| type: number | |
| jobs: | |
| cleanup_database: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install Turso CLI | |
| run: | | |
| curl -sSfL https://get.tur.so/install.sh | bash | |
| echo "$HOME/.turso" >> $GITHUB_PATH | |
| - name: Get DB Name | |
| run: | | |
| PR_NUM="${{ github.event.inputs.pr_number || github.event.pull_request.number }}" | |
| if [ -z "$PR_NUM" ]; then | |
| echo "No PR number provided" | |
| exit 1 | |
| fi | |
| DB_NAME="pr-$PR_NUM" | |
| echo "DB_NAME=$DB_NAME" >> $GITHUB_ENV | |
| - name: Destroy Turso Database | |
| env: | |
| TURSO_API_TOKEN: ${{ secrets.TURSO_API_TOKEN }} | |
| DB_NAME: ${{ env.DB_NAME }} | |
| run: | | |
| turso db destroy "$DB_NAME" --yes || echo "Database already gone or never existed" |