Skip to content

Commit

Permalink
Fix Snowflake cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
philerooski committed Jul 17, 2024
1 parent aa8fc1c commit 6e8c9fa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ jobs:

snowflake-delete:
name: Delete Snowflake development environment
if: ${{ github.ref_name != 'main' && github.ref_name != 'staging' }}
runs-on: ubuntu-latest
env:
PRIVATE_KEY_PASSPHRASE: ${{ secrets.SNOWFLAKE_PRIVATE_KEY_PASSPHRASE }}
Expand Down Expand Up @@ -52,7 +51,7 @@ jobs:
run: |
snow sql \
-q "
SET safe_environment_identifier = (SELECT REPLACE('$GITHUB_REF_NAME', '-', '_'));
SET safe_environment_identifier = (SELECT REPLACE('${{ github.event.ref }}', '-', '_'));
SET database_identifier = CONCAT('recover_', \$safe_environment_identifier);
DROP DATABASE IDENTIFIER(\$database_identifier);
"
Expand Down

0 comments on commit 6e8c9fa

Please sign in to comment.