Skip to content

Export a json file to a collection on a mongodb server or cluster

Notifications You must be signed in to change notification settings

tejasmr/mongoexport

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mongo export

Export a json file to a collection

Usage

  1. Checkout
  2. use tezz-io/mongoexport@master

with ->

  1. uri - in the format mongodb+srv://<username>:<password>@<cluster-name>.xxxxx.mongodb.net
  2. export - path of json from root
  3. db - name of db
  4. collection - name of collection
  5. rewrite - true for rewrite, false for append
name: Mongo Export

on: 
  push:
  pull_request:

jobs:
  mongoexport:
    runs-on: ubuntu-latest
    name: Export MongoDB Json file
    steps:
      - uses: actions/checkout@v2
      - name: Export Json
        uses: tezz-io/mongoexport@v1
        with:
          uri: ${{ secrets.MONGO_URI }}
          export: a.json
          db: testDB
          collection: test
          rewrite: true

About

Export a json file to a collection on a mongodb server or cluster

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published