-
Notifications
You must be signed in to change notification settings - Fork 9
/
action.yml
58 lines (55 loc) · 1.57 KB
/
action.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: 'Dataverse Uploader Action'
description: 'Uploads a repository to Dataverse'
branding:
icon: 'archive'
color: 'orange'
inputs:
DATAVERSE_TOKEN:
required: true
description: "dataverse personal access token"
DATAVERSE_SERVER:
required: true
description: "dataverse server"
DATAVERSE_DATASET_DOI:
required: true
description: "existing dataverse dataset doi"
GITHUB_DIR:
required: false
description: "upload only from specific dirs"
default: ""
DELETE:
required: false
description: "delete all files before upload"
default: 'true'
PUBLISH:
required: false
description: "publish after upload"
default: 'false'
runs:
using: "composite"
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
path: repo
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install -r $GITHUB_ACTION_PATH/requirements.txt
- name: Upload files
shell: bash
run: >-
python
$GITHUB_ACTION_PATH/dataverse.py
"${{inputs.DATAVERSE_TOKEN}}"
"${{inputs.DATAVERSE_SERVER}}"
"${{inputs.DATAVERSE_DATASET_DOI}}"
$GITHUB_REPOSITORY
-d "${{inputs.GITHUB_DIR}}"
-r "${{inputs.DELETE}}"
-p "${{inputs.PUBLISH}}"