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."