Skip to content

Commit

Permalink
ci: build cuiloa container
Browse files Browse the repository at this point in the history
  • Loading branch information
conorsch committed Oct 25, 2023
1 parent be81ea2 commit 855e7c6
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,42 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

cuiloa:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Docker Hub container registry (for pulls)
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Log in to the GitHub container registry (for pushes)
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/penumbra-zone/cuiloa

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64
# TODO: work with upstream and build container in cuiloa repo
file: deployments/containerfiles/Dockerfile-cuiloa
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
3 changes: 3 additions & 0 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ jobs:
- name: bounce osiris
run: kubectl rollout restart deployment osiris-preview

- name: bounce cuiloa
run: kubectl rollout restart deployment cuiloa-preview

# We only run one (1) relayer instance, and re-deploy it as part of the preview update.
# The other end of the configured path is the long-running testnet.
# We ignore errors on the bounce, because we may have removed the deployment out of band:
Expand Down
12 changes: 12 additions & 0 deletions deployments/containerfiles/Dockerfile-cuiloa
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM docker.io/library/node:20-alpine

RUN npm install -g pnpm
USER node
RUN git clone https://github.com/ejmg/cuiloa --depth 1 /home/node/app
WORKDIR /home/node/app

RUN pnpm install
RUN pnpm build

EXPOSE 3000
CMD [ "pnpm", "dev" ]

0 comments on commit 855e7c6

Please sign in to comment.