diff --git a/.github/workflows/clone-db.yml b/.github/workflows/clone-db.yml new file mode 100644 index 0000000..16519ce --- /dev/null +++ b/.github/workflows/clone-db.yml @@ -0,0 +1,11 @@ +name: MongoDB Clone +on: [workflow_dispatch] +jobs: + mongo-clone-action: + runs-on: ubuntu-22.04 + name: Clone MongoDB + steps: + - uses: Maggi64/mongo-clone-action@main + with: + source: "" + target: "" \ No newline at end of file diff --git a/README.md b/README.md index c42a227..325dc2f 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,10 @@ name: MongoDB Clone on: [workflow_dispatch] jobs: mongo-clone-action: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 name: Clone MongoDB steps: - - uses: Maggi64/mongo-clone-action@0.2 + - uses: Maggi64/mongo-clone-action@0.3 with: source: mongodb+srv://:@/ target: mongodb+srv://:@/ diff --git a/action.yml b/action.yml index 404ea78..638bcae 100644 --- a/action.yml +++ b/action.yml @@ -10,6 +10,15 @@ inputs: runs: using: "composite" steps: + - name: Install Mongo Tools + run : | + wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | gpg --dearmor | sudo tee /usr/share/keyrings/mongodb.gpg > /dev/null + echo "deb [ arch=amd64 signed-by=/usr/share/keyrings/mongodb.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list + sudo apt update + sudo apt install mongodb-database-tools + mongodump --version + mongorestore --version + shell: bash - name: Clone Database run: ${{ github.action_path }}/clone.sh ${{ inputs.source }} ${{ inputs.target }} shell: bash