-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.13 KB
/
update-mongodb-flora.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Update MongoDB - Flora
on:
push:
branches: ['main']
paths:
[
'src/lib/**',
'src/flora.ts',
'.github/workflows/update-mongodb-flora.yml'
]
workflow_dispatch:
env:
DWCA_URL: https://ipt.jbrj.gov.br/jbrj/archive.do?r=lista_especies_flora_brasil
jobs:
update-db:
permissions:
contents: 'read'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Install zip
run: sudo apt update && sudo apt install zip
- name: Update DB from web
if: ${{ github.event.inputs.DWCA_URL }}
env:
MONGO_URI: ${{ secrets.MONGO_URI }}
TEMPDIR: /home/runner/work/DarwinCoreJSON/
run: deno run -A src/flora.ts "${{ github.event.inputs.DWCA_URL}}"
- name: Update DB
if: ${{ !github.event.inputs.DWCA_URL }}
env:
MONGO_URI: ${{ secrets.MONGO_URI }}
TEMPDIR: /home/runner/work/DarwinCoreJSON/
run: deno run -A src/flora.ts "${{ env.DWCA_URL }}"