File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 26
26
deno-version : v1.x
27
27
- name : Install zip
28
28
run : sudo apt update && sudo apt install zip
29
- - name : Update DB from web
29
+ - name : Update DB
30
30
env :
31
31
MONGO_URI : ${{ secrets.MONGO_URI }}
32
32
TEMPDIR : /home/runner/work/DarwinCoreJSON/
Original file line number Diff line number Diff line change 1
- import { config } from 'https://deno.land/x/dotenv@v3.2.2/mod.ts'
2
1
import { MongoClient } from 'https://deno.land/x/mongo@v0.31.2/mod.ts'
3
2
4
3
import { processaZip } from './lib/dwca.ts'
5
- const { MONGO_URI } = config ( )
6
4
7
5
const refUrls = await Deno . readTextFile ( './referencias/herbarios.txt' ) . then (
8
6
( contents ) => contents . split ( '\n' )
9
7
)
10
8
11
9
const client = new MongoClient ( )
12
- await client . connect ( MONGO_URI as string )
10
+ await client . connect ( Deno . env . get ( ' MONGO_URI' ) as string )
13
11
const collection = client . database ( 'dwc2json' ) . collection ( 'ocorrencias' )
14
12
console . debug ( 'Cleaning collection' )
15
13
console . log ( await collection . deleteMany ( { } ) )
You can’t perform that action at this time.
0 commit comments