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

build docker base images in CI #322

Merged
merged 3 commits into from
Nov 14, 2024
Merged

build docker base images in CI #322

merged 3 commits into from
Nov 14, 2024

Conversation

abe-winter
Copy link
Member

@abe-winter abe-winter commented Nov 13, 2024

What changed

  • add CI yaml for uploading the docker base images to ghcr

Why

Allow people to use these without having to build them on-laptop

Note

Github CI requires a workflow to be on the main branch before it can be tested; this hasn't been tested and may require another PR. (Once the workflow has ever been on the main branch, it can then be run from other branches).

@abe-winter abe-winter requested a review from a team as a code owner November 13, 2024 22:06
@abe-winter abe-winter requested review from stuqdog and jckras and removed request for a team November 13, 2024 22:06
@abe-winter abe-winter changed the title push docker base images to ghcr build docker base images in CI Nov 13, 2024
Copy link
Member

@jckras jckras left a comment

Choose a reason for hiding this comment

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

LGTM. Left a few questions for my own understanding

type: boolean
default: false
push:
description: "whether to push the images after building them"
Copy link
Member

Choose a reason for hiding this comment

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

just for my own understanding, In what cases would we run this workflow without pushing images to GHCR? why do we have the option to disable pushing inputs.push here?

Copy link
Member Author

Choose a reason for hiding this comment

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

push=false for testing only; for commands with a big side effect (in this case overwriting a public image), I like to have a 'dry run' option

file: etc/docker/base-images/${{ inputs.dockerfile }}
labels: ${{ steps.base-meta.output.labels }}

# build sdk (if inputs.build-sdk)
Copy link
Member

Choose a reason for hiding this comment

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

Can you explain the purpose of separating build-base and build-sdk into two separate steps? are there times where only one would be built?

Copy link
Member Author

Choose a reason for hiding this comment

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

I did this because the instructions in the readme were already two-step

but in general the purpose of 'base images' is to save time on the constant part of the build

here specifically, could imagine us rebuilding the base images weekly or monthly, and rebuilding the sdk image on every release or on main branch update

@abe-winter abe-winter merged commit 3cd492c into main Nov 14, 2024
4 checks passed
@abe-winter abe-winter deleted the aw-docker branch November 14, 2024 18:40
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.

3 participants