Skip to content

Commit

Permalink
this now works
Browse files Browse the repository at this point in the history
  • Loading branch information
mkysel committed Nov 1, 2024
1 parent bd37475 commit e5a3307
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 8 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build-pre-baked-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build pre-baked images

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
push_to_registry:
name: Push Docker Image to GitHub Packages
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
DOCKER_METADATA_PR_HEAD_SHA: true
outputs:
digest: ${{ steps.push.outputs.digest }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Log in to the container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/xmtp/anvil-xmtpd
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v6
id: push
with:
context: .
file: ./dev/baked/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
12 changes: 4 additions & 8 deletions dev/baked/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,14 @@ RUN dev/docker/anvil-background && \

# ACTUAL IMAGE -------------------------------------------------------

FROM debian:bookworm
FROM ghcr.io/foundry-rs/foundry

LABEL maintainer="engineering@xmtp.com"
LABEL source="https://github.com/xmtp/xmtpd"
LABEL description="XMTP Node Software"
LABEL description="Foundry with XMTPD Node contracts and registrations"

# color, nocolor, json
ENV GOLOG_LOG_FMT=nocolor
EXPOSE 8545

EXPOSE 5050

COPY --from=builder /usr/local/bin/anvil /usr/bin/
COPY --from=builder /app/anvil-baked-state anvil-baked-state

CMD ["anvil", "--state", "anvil-baked-state"]
CMD ["anvil", "--state", "anvil-baked-state", "--host", "0.0.0.0"]

0 comments on commit e5a3307

Please sign in to comment.