Skip to content

Build & Auto-Publish Workflow#59

Merged
0xflashboy merged 1 commit intojake/dockerfrom
bgraham-add-gha-build-and-push
Jan 13, 2026
Merged

Build & Auto-Publish Workflow#59
0xflashboy merged 1 commit intojake/dockerfrom
bgraham-add-gha-build-and-push

Conversation

@ghost
Copy link

@ghost ghost commented Jan 13, 2026

Summary of Changes

This PR introduces an automated workflow to build and publish the backend container to GHCR upon merging to main.

  • Optimized Dockerfile: Added backend/Dockerfile_build_and_publish using a multi-stage build.
  • GitHub Action: Added .github/workflows/publish-backend.yml to automatically build and push the container.
  • Versioning: Images are tagged with latest and sha-<short_commit_hash>.

Reasoning

  • Size & Compatibility: We use rust:1.91-slim (based on Debian Bookworm) for building and debian:bookworm-slim for the final runtime. This pairing ensures binary compatibility while stripping out the build toolchain to leave a minimal image.
  • Separation of Concerns: Kept the original Dockerfile for local development/debug builds, while the new Dockerfile_build_and_publish is strictly for production artifacts.

Important Next Steps

Action Required After First Run:
Since this repository is private, the new package will be created as Private by default. To make it publicly accessible:

  1. Wait for the first Action run to complete successfully.
  2. Go to the repository/organization's Packages page.
  3. Select the execution-events-example package.
  4. Go to Package Settings -> Change visibility.
  5. Change visibility from Private to Public.

…kend container to GHCR upon merging to `main`.

*   **Optimized Dockerfile**: Added `backend/Dockerfile_build_and_publish` using a multi-stage build.
*   **GitHub Action**: Added `.github/workflows/publish-backend.yml` to automatically build and push the container.
*   **Versioning**: Images are tagged with `latest` and `sha-<short_commit_hash>`.

*   **Size & Compatibility**: We use `rust:1.91-slim` (based on Debian Bookworm) for building and `debian:bookworm-slim` for the final runtime. This pairing ensures binary compatibility while stripping out the massive build toolchain (~1GB+) to leave a minimal, production-ready image.
*   **Separation of Concerns**: Kept the original `Dockerfile` for local development/debug builds, while the new `Dockerfile_build_and_publish` is strictly for deployment artifacts.

**Action Required After First Run:**
Since this repository is private, the new package will be created as **Private** by default. To make it publicly accessible:

1.  Wait for the first Action run to complete successfully.
2.  Go to the repository/organization's **Packages** page.
3.  Select the `execution-events-example` package.
4.  Go to **Package Settings** -> **Change visibility**.
5.  Change visibility from **Private** to **Public**.
@vercel
Copy link

vercel bot commented Jan 13, 2026

Deployment failed with the following error:

You don't have permission to create a Preview Deployment for this Vercel project: execution-events-example.

View Documentation: https://vercel.com/docs/accounts/team-members-and-roles

@ghost ghost changed the title Optimized Container Build & Auto-Publish Workflow Build & Auto-Publish Workflow Jan 13, 2026
@0xflashboy 0xflashboy merged commit 49ba4c0 into jake/docker Jan 13, 2026
4 of 5 checks passed
Im-Madhur-Gupta pushed a commit that referenced this pull request Jan 14, 2026
* Dockerize backend

* This PR introduces an automated workflow to build and publish the backend container to GHCR upon merging to `main`. (#59)

*   **Optimized Dockerfile**: Added `backend/Dockerfile_build_and_publish` using a multi-stage build.
*   **GitHub Action**: Added `.github/workflows/publish-backend.yml` to automatically build and push the container.
*   **Versioning**: Images are tagged with `latest` and `sha-<short_commit_hash>`.

*   **Size & Compatibility**: We use `rust:1.91-slim` (based on Debian Bookworm) for building and `debian:bookworm-slim` for the final runtime. This pairing ensures binary compatibility while stripping out the massive build toolchain (~1GB+) to leave a minimal, production-ready image.
*   **Separation of Concerns**: Kept the original `Dockerfile` for local development/debug builds, while the new `Dockerfile_build_and_publish` is strictly for deployment artifacts.

**Action Required After First Run:**
Since this repository is private, the new package will be created as **Private** by default. To make it publicly accessible:

1.  Wait for the first Action run to complete successfully.
2.  Go to the repository/organization's **Packages** page.
3.  Select the `execution-events-example` package.
4.  Go to **Package Settings** -> **Change visibility**.
5.  Change visibility from **Private** to **Public**.

---------

Co-authored-by: Brandon Graham <brandon@monad.foundation>
@Im-Madhur-Gupta Im-Madhur-Gupta deleted the bgraham-add-gha-build-and-push branch January 29, 2026 14:32
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.

1 participant