-
Notifications
You must be signed in to change notification settings - Fork 61
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
feat(ci): Docker build rework #17469
base: main
Are you sure you want to change the base?
Conversation
AndesKrrrrrrrrrrr
commented
Jan 10, 2025
•
edited
Loading
edited
- Add specialized docker build workflow
- To see the specific tasks where the Asana app for GitHub is being used, see below:
- https://app.asana.com/0/0/1209109220675086
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #17469 +/- ##
=======================================
Coverage 35.61% 35.61%
=======================================
Files 7015 7015
Lines 150344 150337 -7
Branches 42983 42980 -3
=======================================
Hits 53543 53543
+ Misses 96801 96794 -7
Flags with carried forward coverage won't be shown. Click here to find out more. see 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportAll test runs ✅ 10 Total Test Services: 0 Failed, 10 Passed Test ServicesThis report shows up to 10 services
|
This reverts commit 6369f40.
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.
Self review
on: | ||
pull_request: | ||
branches: [main, 'release-*', 'pre-release-*'] | ||
push: | ||
branches: [main, 'release-*', 'pre-release-*'] | ||
workflow_dispatch: | ||
inputs: | ||
projects: | ||
description: 'Comma-separated list of project names to build.' | ||
required: true |
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.
These triggers need to be updated, and inputs adapted to be a reusable workflow.
.github/workflows/docker.yml
Outdated
shell: bash -euo pipefail {0} | ||
|
||
env: | ||
PUSH_REGISTRY: ${{ vars.PUSH_REGISTRY }} |
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.
Add comment on what this is.
.github/workflows/docker.yml
Outdated
runs-on: ec2-runners | ||
container: | ||
image: public.ecr.aws/m3u4c4h9/island-is/actions-runner-public:latest |
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.
Make container.image
be config, instead of hard-coded string.
.github/workflows/docker.yml
Outdated
- name: Build arg prep | ||
id: build-args | ||
run: | | ||
echo node-image-tag="$(./scripts/ci/get-node-version.mjs)" >>"$GITHUB_OUTPUT" | ||
yarn info --json @playwright/test | jq -r '.children.Version | "playwright-image-tag=v\(.)-focal"' >>"$GITHUB_OUTPUT" | ||
|
||
- name: Compute merge commit | ||
id: merge-commit | ||
if: ${{ !github.event.localrun }} | ||
continue-on-error: true | ||
run: | |
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.
Consider consolidating into a single step name: Prepare inputs
.github/workflows/docker.yml
Outdated
- name: Compute merge commit | ||
id: merge-commit |
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 step is unnecessary, depending on the merge/tag strategy selected. Not needed if we use e.g. PR numbers
- name: Docker build/cache deps | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . |
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.
Cache more targets, e.g. all base-*
targets
context: . | ||
file: scripts/ci/Dockerfile | ||
push: false | ||
target: output-base-full |
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.
Fix target
.github/workflows/docker.yml
Outdated
cache-from: ${{ steps.inputs.outputs.build-cache }} | ||
cache-to: ${{ steps.inputs.outputs.build-cache }} |
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.
Change to shared cache
.github/workflows/docker.yml
Outdated
cache-from: ${{ steps.inputs.outputs.build-cache }} | ||
cache-to: ${{ steps.inputs.outputs.build-cache }},mode=min |
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.
Use shared cache repository, and per-project cache repository
.github/workflows/docker.yml
Outdated
cache-from: ${{ steps.inputs.outputs.build-cache }} | ||
cache-to: ${{ steps.inputs.outputs.build-cache }} |
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.
Use mode=max
for dependency cache