-
Notifications
You must be signed in to change notification settings - Fork 25
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
Multi arch docker build #104
Changes from 16 commits
b04422c
8bacff9
1626d4b
8c343db
fef9050
085b527
6adaad9
4a9b348
e73c8a7
6f70a0e
2244b55
5a6dc5e
412b8ed
9b12b24
031af2e
bfed73f
352b133
8edef7f
860ef41
f254c13
bee2927
7b33c07
7b38f14
608a31a
2c95e8b
bb5c4a6
ec8c103
57865c2
1314ea6
69a0fc6
df86aa8
db2f55c
99ffbd7
b014f4f
1058e7e
f43b19d
9f6540b
8de8170
bc19e06
ef61bd4
6c4278a
cb3247e
0ff2f69
156cc86
89004e7
1de5c50
d47970a
fca2fa2
e7b0aea
0337932
9230a86
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Push Docker image | |
on: | ||
push: | ||
branches: | ||
- master | ||
- multi-arch-docker-build | ||
tags: | ||
- zeus-v* | ||
paths: | ||
|
@@ -18,11 +18,20 @@ on: | |
- 'LICENSE' | ||
- 'setup.py' | ||
- 'pyproject.toml' | ||
|
||
pull_request: | ||
branches: | ||
- multi-arch-docker-build | ||
jaywonchung marked this conversation as resolved.
Show resolved
Hide resolved
|
||
jobs: | ||
build_and_push: | ||
if: github.repository_owner == 'ml-energy' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
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. What is this one? 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. It ensures that both platform builds will run to completion, regardless of whether one of them fails. Do you think this is unnecessary? 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. Is fail-fast 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 have set fail-fast value to true as it is not true by default. 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. https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast I think it's true by default. If it is so, let's delete the line. 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. Ah sorry, it seems to be true by default. Removed the line! |
||
matrix: | ||
platform: | ||
- linux/amd64 | ||
- linux/arm64 | ||
|
||
steps: | ||
- name: Remove unnecessary files | ||
run: | | ||
|
@@ -31,33 +40,32 @@ jobs: | |
sudo rm -rf "/usr/local/share/boost" | ||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Docker Hub login | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_TOKEN }} | ||
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. The |
||
uses: actions/checkout@v4 | ||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Generate image metadata | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
symbioticlab/zeus | ||
mlenergy/zeus | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=tag | ||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
type=schedule | ||
type=sha | ||
jaywonchung marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: Build and push to Docker Hub | ||
uses: docker/build-push-action@v3 | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: docker/Dockerfile | ||
builder: ${{ steps.buildx.outputs.name }} | ||
push: true | ||
push: false | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=registry,ref=mlenergy/zeus:buildcache | ||
cache-to: type=registry,ref=mlenergy/zeus:buildcache,mode=max | ||
build-args: TARGETARCH=amd64 | ||
platforms: ${{ matrix.platform }} | ||
|
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 can be reverted back to
master
now, right?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.
yes!
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.
Hasn't been addressed. Please do a thorough scan of the workflow file to ensure that it can land in
master
and request review.