| 1 |
.. -*- mode: rst -*- |
| 2 |
.. vi: set ft=rst sts=4 ts=4 sw=4 et tw=79: |
| 3 |
|
| 4 |
.. _chap_design_github_action: |
| 5 |
|
| 6 |
************* |
| 7 |
GitHub Action |
| 8 |
************* |
| 9 |
|
| 10 |
.. topic:: Specification scope and status |
| 11 |
|
| 12 |
This specification describes a proposed interface to a DataLad GitHub Action. |
| 13 |
https://github.com/datalad/datalad-action provides an implementation which loosely |
| 14 |
followed this specification. |
| 15 |
|
| 16 |
The purpose of the DataLad GitHub Action is to support CI testing with DataLad datasets |
| 17 |
by making it easy to install ``datalad`` and ``get`` data from the datasets. |
| 18 |
|
| 19 |
|
| 20 |
Example Usage |
| 21 |
============= |
| 22 |
|
| 23 |
Dataset installed at ``${GITHUB_WORKSPACE}/studyforrest-data-phase2``, |
| 24 |
``get``'s all the data:: |
| 25 |
|
| 26 |
- uses: datalad/datalad-action@master |
| 27 |
with: |
| 28 |
datasets: |
| 29 |
- source: https://github.com/psychoinformatics-de/studyforrest-data-phase2 |
| 30 |
- install_get_data: true |
| 31 |
|
| 32 |
Specify advanced options:: |
| 33 |
|
| 34 |
- name: Download testing data |
| 35 |
uses: datalad/datalad-action@master |
| 36 |
with: |
| 37 |
datalad_version: ^0.15.5 |
| 38 |
add_datalad_to_path: false |
| 39 |
datasets: |
| 40 |
- source: https://github.com/psychoinformatics-de/studyforrest-data-phase2 |
| 41 |
- branch: develop |
| 42 |
- install_path: test_data |
| 43 |
- install_jobs: 2 |
| 44 |
- install_get_data: false |
| 45 |
- recursive: true |
| 46 |
- recursion_limit: 2 |
| 47 |
- get_jobs: 2 |
| 48 |
- get_paths: |
| 49 |
- sub-01 |
| 50 |
- sub-02 |
| 51 |
- stimuli |
| 52 |
|
| 53 |
Options |
| 54 |
======= |
| 55 |
|
| 56 |
``datalad_version`` |
| 57 |
------------------- |
| 58 |
|
| 59 |
``datalad`` version to install. Defaults to the latest release. |
| 60 |
|
| 61 |
``add_datalad_to_path`` |
| 62 |
----------------------- |
| 63 |
|
| 64 |
Add ``datalad`` to the ``PATH`` for manual invocation in subsequent steps. |
| 65 |
|
| 66 |
Defaults to ``true``. |
| 67 |
|
| 68 |
``source`` |
| 69 |
---------- |
| 70 |
|
| 71 |
URL for the dataset (mandatory). |
| 72 |
|
| 73 |
``branch`` |
| 74 |
---------- |
| 75 |
|
| 76 |
Git branch to install (optional). |
| 77 |
|
| 78 |
``install_path`` |
| 79 |
---------------- |
| 80 |
|
| 81 |
Path to install the dataset relative to `GITHUB_WORKSPACE`. |
| 82 |
|
| 83 |
Defaults to the repository name. |
| 84 |
|
| 85 |
``install_jobs`` |
| 86 |
---------------- |
| 87 |
|
| 88 |
Jobs to use for ``datalad install``. |
| 89 |
|
| 90 |
Defaults to ``auto``. |
| 91 |
|
| 92 |
``install_get_data`` |
| 93 |
-------------------- |
| 94 |
|
| 95 |
Get all the data in the dataset by passing ``--get-data`` to ``datalad install``. |
| 96 |
|
| 97 |
Defaults to ``false``. |
| 98 |
|
| 99 |
``recursive`` |
| 100 |
------------- |
| 101 |
|
| 102 |
Boolean defining whether to clone subdatasets. |
| 103 |
|
| 104 |
Defaults to ``true``. |
| 105 |
|
| 106 |
``recursion_limit`` |
| 107 |
------------------- |
| 108 |
|
| 109 |
Integer defining limits to recursion. |
| 110 |
|
| 111 |
If not defined, there is no limit. |
| 112 |
|
| 113 |
``get_jobs`` |
| 114 |
------------ |
| 115 |
|
| 116 |
Jobs to use for ``datalad get``. |
| 117 |
|
| 118 |
Defaults to ``auto``. |
| 119 |
|
| 120 |
|
| 121 |
``get_paths`` |
| 122 |
------------- |
| 123 |
|
| 124 |
A list of paths in the dataset to download with ``datalad get``. |
| 125 |
|
| 126 |
Defaults to everything. |