-
Notifications
You must be signed in to change notification settings - Fork 21
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
[BIOMAGE-1989]- Reduce UI build time #770
Changes from all commits
229838f
054e709
d2c33f5
648aabd
5809646
f86db53
5b9f32b
e2692d1
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 |
---|---|---|
|
@@ -54,18 +54,15 @@ jobs: | |
env: | ||
CI: true | ||
steps: | ||
- id: setup-node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
|
||
- id: checkout | ||
name: Check out source code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
|
||
- id: cache-seek | ||
name: Check for npm cache hit | ||
uses: c-hive/gha-npm-cache@v1 | ||
- id: setup-node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14' | ||
cache: 'npm' | ||
|
||
- id: install | ||
name: Install dependencies | ||
|
@@ -133,7 +130,7 @@ jobs: | |
steps: | ||
- id: checkout | ||
name: Check out source code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
|
||
- id: download-build-out | ||
name: Download Next.js build output | ||
|
@@ -205,6 +202,10 @@ jobs: | |
env: | ||
REPO_NAME: ${{ steps.ref.outputs.repo-name }} | ||
|
||
- id: setup-buildx | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- id: build | ||
name: Build Docker image | ||
uses: docker/build-push-action@v2 | ||
|
@@ -214,7 +215,10 @@ jobs: | |
platforms: linux/amd64 | ||
tags: ${{ format('{0}/{1}:{2}', steps.login-ecr.outputs.registry, steps.ref.outputs.repo-name, steps.ref.outputs.image-tag) }} | ||
push: false | ||
load: true | ||
build-args: READONLY_API_TOKEN_GITHUB=${{ secrets.READONLY_API_TOKEN_GITHUB }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
Comment on lines
+220
to
+221
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. how did you work out that we need to have these parameters? 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. I learned that the docker/build-push-action has internal caching capabilities and we're not using it. It has an option for github actions, and I'm following the examples here: https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md#github-cache |
||
|
||
- id: push | ||
name: Push docker image to ECR | ||
|
@@ -246,7 +250,7 @@ jobs: | |
steps: | ||
- id: checkout | ||
name: Check out source code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
|
||
- id: setup-aws | ||
name: Configure AWS credentials | ||
|
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.
Why do we need this?
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.
I saw from the error in this run: https://github.com/hms-dbmi-cellenics/ui/runs/7291171952?check_suite_focus=true and read about it from the
docker/build-push-action
section about driver: https://github.com/docker/build-push-action#usage