From 7e59fbcf029d0d8253dbeb1baf932eaf25ecea8d Mon Sep 17 00:00:00 2001 From: Leo Huang Date: Fri, 22 Nov 2024 13:28:36 -0800 Subject: [PATCH] Create mongo-reset.yaml for manual triggering --- .github/workflows/mongo-reset.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/mongo-reset.yaml diff --git a/.github/workflows/mongo-reset.yaml b/.github/workflows/mongo-reset.yaml new file mode 100644 index 000000000..68fdf8db6 --- /dev/null +++ b/.github/workflows/mongo-reset.yaml @@ -0,0 +1,23 @@ +name: Reset Dev Mongo + +on: + workflow_dispatch: + +jobs: + reset-mongo: + name: SSH and Reset Dev MongoDB State + runs-on: ubuntu-latest + steps: + - name: SSH and Reset MongoDB + uses: appleboy/ssh-action@v1.2.0 + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USERNAME }} + key: ${{ secrets.SSH_KEY }} + script: | + set -e # Exit immediately if a command fails + + # Create Mongo job from mongo-reset + kubectl create job --from=cronjob/mongo-reset mongo-reset-manual + + echo "MongoDB reset scheduled."