From 59844156634de1690ae9616ce0730393e0fd1d28 Mon Sep 17 00:00:00 2001 From: "segev.elmalech" Date: Tue, 5 Sep 2023 18:32:03 +0300 Subject: [PATCH] Add Cleaning environment [skip actions] --- .github/workflows/sonar_single_account_cli.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sonar_single_account_cli.yml b/.github/workflows/sonar_single_account_cli.yml index 8dd1c3063..80092ab20 100644 --- a/.github/workflows/sonar_single_account_cli.yml +++ b/.github/workflows/sonar_single_account_cli.yml @@ -91,7 +91,21 @@ jobs: key: ${{ env.JUMP_SERVER_KEY }} port: 22 command_timeout: "2h" - envs: REMOTE_EXAMPLE_DIR + envs: TARGET_DIR + script: | + cd $TARGET_DIR + rm -rf dsfkit + rm -rf dsfkit.zip + + - name: Delete Old Environment + uses: appleboy/ssh-action@v0.1.8 + with: + host: 54.179.25.83 + username: ec2-user + key: ${{ env.JUMP_SERVER_KEY }} + port: 22 + command_timeout: "2h" + envs: TARGET_DIR script: | terraform -chdir=$REMOTE_EXAMPLE_DIR destroy -auto-approve rm -rf dsfkit