diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 7771fa28c4..ed6593e290 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -1,6 +1,6 @@ name: Build Docker -# Controls when the action will run. +# Controls when the action will run. # Triggers the workflow for a pull request for # dev when the Dockerfile file changes. on: @@ -17,7 +17,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v1 with: registry: pgc-images.sbgenomics.com username: ${{ secrets.DOCKER_HUB_USERNAME }} @@ -27,5 +27,14 @@ jobs: uses: docker/build-push-action@v2 with: push: false + context: . + file: ./Dockerfile + tags: myimage:latest + outputs: type=docker,dest=/tmp/myimage.tar - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: myimage + path: /tmp/myimage.tar diff --git a/.github/workflows/run-analysis.yml b/.github/workflows/run-analysis.yml index 8a0fd1f4c5..b3a23ce36c 100644 --- a/.github/workflows/run-analysis.yml +++ b/.github/workflows/run-analysis.yml @@ -4,28 +4,42 @@ name: Run Analysis on: workflow_dispatch: pull_request: + branches: [ dev ] jobs: - build_and_run: + build_and_download_data: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v3 name: Checkout repo +# Build docker container and download testing data - name: Build container and download data uses: ./ id: download-data with: - args: OPENPBTA_URL=https://s3.amazonaws.com/d3b-openaccess-us-east-1-prd-pbta/data OPENPBTA_RELEASE=testing bash download-data.sh + args: OPENPEDCAN_URL=https://s3.amazonaws.com/d3b-openaccess-us-east-1-prd-pbta/open-targets OPENPEDCAN_RELEASE=testing bash download-data.sh - - name: Run 01-create-interaction-plots in container - uses: ./ - id: create-interaction-plots - with: - args: OPENPBTA_ALL=0 bash analyses/interaction-plots/01-create-interaction-plots.sh + run_analysis: + runs-on: ubuntu-18.04 + needs: build_and_download_data + steps: - - name: Run RUN-telomerase-activity-prediction in container - uses: ./ - id: RUN-telomerase-activity-prediction + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Download artifact + uses: actions/download-artifact@v2 with: - args: bash analyses/telomerase-activity-prediction/RUN-telomerase-activity-prediction.sh + name: myimage + path: /tmp + + - name: Load Docker image + run: | + docker load --input /tmp/myimage.tar + docker image ls -a + + - name: Run Molecular Subtyping - MB + id: RUN-molecular-subtyping-MB + run: | + OPENPBTA_SUBSET=0 bash analyses/molecular-subtyping-MB/run-molecular-subtyping-mb.sh diff --git a/scripts/run-analysis.sh b/scripts/run-analysis.sh index 86aaedb42f..bc1406fa3c 100755 --- a/scripts/run-analysis.sh +++ b/scripts/run-analysis.sh @@ -1,3 +1,3 @@ -#!/bin/sh +#!/bin/bash -sh -c "$*" +bash -c "$*"