Browse Source

maint: use templateflow/gha-workflow-superdataset script

Oscar Esteban 2 years ago
parent
commit
203aa6941d
1 changed files with 5 additions and 37 deletions
  1. 5 37
      .github/workflows/update-superdataset.yml

+ 5 - 37
.github/workflows/update-superdataset.yml

@@ -1,46 +1,14 @@
-# This workflow will install Python dependencies, run tests and lint with a single version of Python
-# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
 
 name: Update Super-Dataset
-
 on:
   push:
     branches: [ master ]
 
 jobs:
-  build:
-
+  update_superdataset:
     runs-on: ubuntu-latest
-
     steps:
-    - uses: actions/cache@v1
-      with:
-        path: /usr/share/miniconda
-        key: conda-dist-v1
-        restore-keys: |
-          conda-dist-
-    - name: Setup conda
-      uses: s-weigand/setup-conda@v1
-      with:
-        update-conda: false
-        python-version: 3.7
-        conda-channels: anaconda, conda-forge
-    - name: Install dependencies
-      run: |
-        conda config --set always_yes True
-        conda install git-annex datalad
-    - name: Pacify DataLad about git config
-      run: |
-        git config --global user.name "NiPreps Bot"
-        git config --global user.email "nipreps@gmail.com"
-    - uses: webfactory/ssh-agent@v0.5.3
-      with:
-        ssh-private-key: ${{ secrets.NIPREPS_BOT }}
-    - name: Install & update super-dataset
-      run: |
-        datalad install git@github.com:templateflow/templateflow.git
-        cd templateflow/
-        datalad install ${GITHUB_REPOSITORY##*/}
-        datalad update -r --merge any .
-        datalad save -m "auto(${GITHUB_REPOSITORY##*/}): content update"
-        datalad push --to origin
+      - name: "Update TemplateFlow's superdataset"
+        uses: templateflow/actions-template@main
+        env:
+          SECRET_KEY: ${{ secrets.NIPREPS_BOT }}