Skip to content
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

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

devbyaccident
Copy link
Member

@devbyaccident devbyaccident commented Oct 6, 2023

This PR makes the following changes to CI:

  1. Build and push action will only run if Dockerfile changes are made to dev branch. (More details below)
  2. Run Analysis job will run using the latest docker image without rebuilding.

This should allow for an economical use of large Github runners and cut the time to run the analysis job from over 2 and a half hours to about 30 minutes.

@devbyaccident devbyaccident self-assigned this Oct 6, 2023
@devbyaccident devbyaccident force-pushed the feature/cbl/add-docker-condition branch from 947a934 to 67a5c34 Compare October 6, 2023 20:58
@devbyaccident devbyaccident force-pushed the feature/cbl/add-docker-condition branch from ddb9c33 to 8f16cf5 Compare October 10, 2023 15:10
branches:
- 'dev'
paths:
- 'Dockerfile'
Copy link
Member Author

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.

jobs:
build_and_publish_image:
name: Build and Publish Image
runs-on: ubuntu-latest-m
Copy link
Member Author

Choose a reason for hiding this comment

The 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.

Comment on lines 4 to 5
pull_request:
workflow_dispatch:
Copy link
Member Author

Choose a reason for hiding this comment

The 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:

  • A new PR is opened
  • A manual workflow is triggered through the GitHub Actions console

@@ -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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the latest tag for analysis means that changes to the Dockerfile and changes to the packages/data HAVE to be separate PRs.

@devbyaccident devbyaccident marked this pull request as ready for review October 10, 2023 19:23
@devbyaccident devbyaccident requested a review from a team as a code owner October 10, 2023 19:23
@devbyaccident devbyaccident merged commit 25f6abc into dev Oct 10, 2023
24 checks passed
@devbyaccident devbyaccident deleted the feature/cbl/add-docker-condition branch October 10, 2023 19:43
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants