Build-database #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build-database | |
on: | |
push: | |
branches: | |
- '**' | |
paths: | |
- ./data/ | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
# Placeholder | |
# build-bmd: | |
# #if: github.actor != 'github-actions[bot]' | |
# runs-on: ubuntu-20.04 | |
# environment: build | |
# steps: | |
# - name: Checkout Repo | |
# uses: actions/checkout@v3 | |
# - name: Download artifacts from previous drug gen | |
# uses: actions/download-artifact@v3 | |
# - name: Pull sample image | |
# run: docker pull sgosline/srp-bmd | |
# - name: Run bmd python command | |
# run: | | |
# docker run -v $PWD:/tmp sgosline/srp-bmd | |
# - name: List files cwd | |
# run: ls -la | |
build-samples: | |
#if: github.actor != 'github-actions[bot]' | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Download artifacts from previous drug gen | |
uses: actions/download-artifact@v3 | |
- name: Pull sample image | |
run: docker pull sgosline/srp-samplechem | |
- name: Run sample-chem python command | |
run: | | |
docker run -v $PWD:/tmp sgosline/srp-samplechem | |
- name: List files cwd | |
run: ls -la | |
- name: move files | |
run: | | |
mkdir samp-files | |
mv *csv samp-files | |
- name: upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: samp-files | |
path: samp-files | |
build-expo: | |
#if: github.actor != 'github-actions[bot]' | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Download artifacts from previous drug gen | |
uses: actions/download-artifact@v3 | |
- name: Pull sample image | |
run: docker pull sgosline/srp-exposome | |
- name: Run sample-chem python command | |
run: | | |
docker run -v $PWD:/tmp sgosline/srp-exposome | |
- name: List files cwd | |
run: ls -la | |
- name: Copy files to artifact | |
run: | | |
mkdir expo-files | |
mv *.csv expo-files | |
- name: upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: expo-files | |
path: expo-files | |
build-expr: | |
#if: github.actor != 'github-actions[bot]' | |
runs-on: ubuntu-20.04 | |
needs: build-samples | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Download artifacts from sample generation | |
uses: actions/download-artifact@v3 | |
with: | |
name: samp-files | |
path: samp-files | |
- name: Pull sample image | |
run: docker pull sgosline/srp-zfexp | |
- name: move chemical list to tmp | |
run: mv samp-files/chemicals.csv . | |
- name: Run zfexp python command | |
run: | | |
docker run -v $PWD:/tmp sgosline/srp-zfexp | |
- name: List files cwd | |
run: ls -la | |
- name: Copy files to artifact | |
run: | | |
mkdir expr-files | |
mv *csv expr-files | |
- name: upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: expr-files | |
path: expr-files | |
artifact-test: | |
needs: [build-samples,build-expo,build-expr] | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Download artifacts from expression | |
uses: actions/download-artifact@v2 | |
with: | |
name: expr-files | |
- name: Downlod artifacts from exposome | |
uses: actions/download-artifact@v2 | |
with: | |
name: expo-files | |
- name: Downlod artifacts from samples | |
uses: actions/download-artifact@v2 | |
with: | |
name: samp-files | |
- name: List files cwd | |
run: ls -la * | |
- name: Moves files to single directory | |
run: | | |
mkdir srpAnalytics | |
mv *csv srpAnalytics | |
#gzip -cvf srpAnalytics/* srpAnalytics.gz | |
- name: Pushes to figshare | |
uses: figshare/[email protected] | |
with: | |
FIGSHARE_TOKEN: ${{ secrets.FIGSHARE_TOKEN }} | |
FIGSHARE_ENDPOINT: 'https://api.figshare.com/v2' | |
FIGSHARE_ARTICLE_ID: 26240471 | |
# FIGSHARE_PROJECT_ID: 177459 | |
DATA_DIR: 'srpAnalytics' | |
#zipfiles push to figshare | |