-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
👷 Change build and run analysis conditions #445
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'dev' | ||
paths: | ||
- 'Dockerfile' | ||
|
||
jobs: | ||
build_and_publish_image: | ||
name: Build and Publish Image | ||
runs-on: ubuntu-latest-m | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using the large runner to build since it will be more infrequent per the condition above. |
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: pgc-images.sbgenomics.com/d3b-bixu/open-pedcan | ||
tags: | | ||
type=raw,value=latest | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: pgc-images.sbgenomics.com | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
build-args: github_pat=${{ secrets.GITHUB_TOKEN }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,12 @@ | ||
name: CI | ||
name: Analysis | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
pull_request: | ||
workflow_dispatch: | ||
Comment on lines
4
to
5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the analysis workflow now. It will trigger due to either of the below conditions:
|
||
|
||
jobs: | ||
build_and_publish_image: | ||
name: Build and Publish Image | ||
runs-on: ubuntu-latest-m | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: pgc-images.sbgenomics.com/d3b-bixu/open-pedcan | ||
tags: | | ||
type=raw,value=analysisjob | ||
# Only tag the image with latest if we're building on the default | ||
# branch (e.g., dev). | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: pgc-images.sbgenomics.com | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
build-args: github_pat=${{ secrets.GITHUB_TOKEN }} | ||
|
||
run_analysis: | ||
name: Run Analysis | ||
needs: build_and_publish_image | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
@@ -166,19 +123,19 @@ jobs: | |
- uses: actions/checkout@v3 | ||
|
||
- name: Download Data | ||
uses: docker://pgc-images.sbgenomics.com/d3b-bixu/open-pedcan:analysisjob | ||
uses: docker://pgc-images.sbgenomics.com/d3b-bixu/open-pedcan:latest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using the |
||
with: | ||
entrypoint: ./download-data.sh | ||
env: | ||
OPENPEDCAN_URL: https://s3.amazonaws.com/d3b-openaccess-us-east-1-prd-pbta/open-targets | ||
OPENPEDCAN_RELEASE: testing | ||
|
||
- name: Run Analysis | ||
uses: docker://pgc-images.sbgenomics.com/d3b-bixu/open-pedcan:analysisjob | ||
uses: docker://pgc-images.sbgenomics.com/d3b-bixu/open-pedcan:latest | ||
with: | ||
entrypoint: analyses/${{ matrix.entrypoint }} | ||
env: | ||
OPENPBTA_SUBSET: ${{ matrix.openpbta_subset }} | ||
OPENPBTA_TESTING: ${{ matrix.openpbta_testing }} | ||
RUN_FOR_SUBTYPING: ${{ matrix.run_for_subtyping }} | ||
OPENPEDCAN_POLYA_STRAND: ${{ matrix.openpedcan_polya_strand }} | ||
OPENPEDCAN_POLYA_STRAND: ${{ matrix.openpedcan_polya_strand }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition will only trigger if a commit is merged into the
dev
branch AND that commit has a change to the Dockerfile.