Skip to content

fix(runtime): initialize commands with user home #5

fix(runtime): initialize commands with user home

fix(runtime): initialize commands with user home #5

name: E2B Runtime Image
on:
push:
branches:
- main
- "feat/e2b-*"
paths:
- "deploy/e2b/**"
- ".github/workflows/e2b-runtime-image.yml"
workflow_dispatch: {}
permissions:
contents: read
packages: write
concurrency:
group: e2b-runtime-image-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Test envd initialization
run: python3 -m unittest discover -s deploy/e2b -p 'test_*.py'
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate image metadata
id: metadata
uses: docker/metadata-action@v5
with:
images: ghcr.io/a3s-lab/box-e2b-runtime
tags: |
type=sha,format=long
type=raw,value=edge,enable={{is_default_branch}}
- name: Build and push the runtime image
uses: docker/build-push-action@v6
with:
context: .
file: deploy/e2b/Dockerfile
platforms: ${{ github.ref == 'refs/heads/main' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
cache-from: type=gha,scope=e2b-runtime
cache-to: type=gha,mode=max,scope=e2b-runtime
provenance: mode=max
sbom: true