Skip to content

Commit

Permalink
install mongo tools for ubuntu 20
Browse files Browse the repository at this point in the history
test workflow


try apt-get update


try another install
  • Loading branch information
Maggi64 committed Feb 11, 2023
1 parent 91cc3b9 commit 47b16cb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/clone-db.yml
Original file line number Diff line number Diff line change
@@ -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: ""
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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://<DB_USER>:<DB_PASSWORD>@<DB_HOST>/<SOURCE_DB_NAME>
target: mongodb+srv://<DB_USER>:<DB_PASSWORD>@<DB_HOST>/<TARGET_DB_NAME>
Expand Down
9 changes: 9 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 47b16cb

Please sign in to comment.