Skip to content

Releases: SimTech-Research-Data-Management/dataverse-sync

v3

09 May 10:04
a6759bb

Choose a tag to compare

What's Changed

Full Changelog: v2...v3

v2 Hot Fix

28 Nov 15:19
f1bcc12

Choose a tag to compare

  • Fixes action crashing due to directories in path list - #2

Full Changelog: v1...v2

v1

26 Nov 23:58
abf9d3d

Choose a tag to compare

v1

Dataverse Repository Sync

Tests

Are you looking for an easy way to work with Dataverse? If so, you might find this GitHub workflow helpful. It's basically a mini-git system that syncs your repository with your Dataverse dataset. Here's what it does:

  • Pushes all your repository files to your dataset
  • Detects any changes and updates your dataset files accordingly
  • Removes any files from your dataset that are not in your repository
  • Lets you push content to any directory within your dataset.

Hope that helps!

Usage

# Push to the root of the dataset
- name: Synchronize to DV
  uses: JR-1991/dataverse-sync@v1
  with:
    dataverse_url: "https://demo.dataverse.org"
    api_token: ${ secrets.MY_API_TOKEN }
    persistent_id: "doi:10.5072/FK2/ABC123"

# Push to a specific sub directory
- name: Synchronize to DV
  uses: JR-1991/dataverse-sync@v1
  with:
    dataverse_url: "https://demo.dataverse.org"
    api_token: ${ secrets.MY_API_TOKEN }
    persistent_id: "doi:10.5072/FK2/ABC123"
    directory: "some/sub/dir"

Inputs

INPUT TYPE REQUIRED DEFAULT DESCRIPTION
api_token string true The API Token used for
authentication
dataverse_url string true The URL of the Dataverse
instance.
directory string true The directory to which the
respsitory needs to be synced
persistent_id string true The persistent ID of the
dataset.

Complete workflow example

name: Dataverse Sync

# Choose whatever suits your needs
on: [push, release]

jobs:
  dv-sync:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Synchronize to DV
      uses: JR-1991/dataverse-sync@v1
      with:
        dataverse_url: "Enter your Dataverse URL here"
        api_token: ${{ secrets.DV_API_TOKEN }}
        persistent_id: "Enter your dataset persistent ID here"