Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/sunhat-dev-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish sunaget/sunhat-dev

on:
workflow_dispatch:
inputs:
image_tag:
description: 'tag of image(e.g. 0.1.0)'
required: true
type: string

jobs:
build-and-push:
runs-on: ubuntu-latest

environment: release

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: sunagent/sunhat-dev
tags: |
type=sha,prefix=,suffix=,format=short
type=raw,value=${{ github.event.inputs.image_tag }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
file: ./docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
27 changes: 27 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM ubuntu:22.04

# default shell
SHELL ["/bin/bash", "-c"]

# base deps
RUN apt-get update \
&& apt-get install -y python3 python3-pip make g++ build-essential wget curl ca-certificates git vim\
&& rm -rf /var/lib/apt/lists/*

# nvm & nodejs
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
RUN source /root/.nvm/nvm.sh \
&& nvm install 22 \
&& npm install -g npm@latest

# vyper
RUN pip3 install vyper==0.2.8

# pnpm
RUN wget -qO- https://get.pnpm.io/install.sh | ENV="$HOME/.bashrc" SHELL="$(which bash)" bash -

# foundry
RUN curl -L https://foundry.paradigm.xyz | bash
RUN /root/.foundry/bin/foundryup --install nightly

WORKDIR /workspace