diff --git a/.github/workflows/cleanup.yaml b/.github/workflows/cleanup.yaml index 8f7af77..c03924b 100644 --- a/.github/workflows/cleanup.yaml +++ b/.github/workflows/cleanup.yaml @@ -6,7 +6,7 @@ jobs: snowflake-delete: name: Delete Snowflake development environment - if: ${{ github.ref_name != 'main' && github.ref_name != 'staging' }} + if: ${{ github.event.ref != 'main' && github.event.ref != 'staging' }} runs-on: ubuntu-latest env: PRIVATE_KEY_PASSPHRASE: ${{ secrets.SNOWFLAKE_PRIVATE_KEY_PASSPHRASE }} @@ -52,7 +52,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); "