Skip to content

Commit

Permalink
update new project
Browse files Browse the repository at this point in the history
  • Loading branch information
paritad99 committed Dec 21, 2023
0 parents commit b0e9256
Show file tree
Hide file tree
Showing 6,038 changed files with 3,229,045 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
53 changes: 53 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This workflow is useful if you want to automate the process of:
#
# a) Creating a new prelease when you push a new tag with a "v" prefix (version).
#
# This type of prerelease is meant to be used for production: alpha, beta, rc, etc. types of releases.
# After the prerelease is created, you need to make your changes on the release page at the relevant
# Github page and publish your release.
#
# b) Creating/updating the "latest" prerelease when you push to your default branch.
#
# This type of prelease is useful to make your bleeding-edge binaries available to advanced users.
#
# The workflow will not run if there is no tag pushed with a "v" prefix and no change pushed to your
# default branch.
on: push

jobs:
might_release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Prepare Release Variables
id: vars
uses: ignite/cli/actions/release/vars@main

- name: Issue Release Assets
uses: ignite/cli/actions/cli@main
if: ${{ steps.vars.outputs.should_release == 'true' }}
with:
args: chain build --release --release.prefix ${{ steps.vars.outputs.tarball_prefix }} -t linux:amd64 -t darwin:amd64 -t darwin:arm64

- name: Delete the "latest" Release
uses: dev-drprasad/[email protected]
if: ${{ steps.vars.outputs.is_release_type_latest == 'true' }}
with:
tag_name: ${{ steps.vars.outputs.tag_name }}
delete_release: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish the Release
uses: softprops/action-gh-release@v1
if: ${{ steps.vars.outputs.should_release == 'true' }}
with:
tag_name: ${{ steps.vars.outputs.tag_name }}
files: release/*
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
vue/node_modules
vue/dist
release/
.idea/
.vscode/
.DS_Store
*.dot
*.log
gaia_config/app.toml
gaia_config/client.toml
gaia_config/config copy.toml
gaia_config/config.toml
gaia_config/genesis.json
gaia_config/node_key.json
gaia_config/priv_validator_key.json
gaia_config/temp.json
74 changes: 74 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
FROM --platform=linux ubuntu:22.04 as base
ARG BUILDARCH

# Change your versions here
ENV GO_VERSION=1.21.1
ENV IGNITE_VERSION=28.0.0
ENV NODE_VERSION=18.x
ENV MOCKGEN_VERSION=1.6.0
ENV PROTOC_VERSION=21.7

FROM base AS platform-amd64
ENV PROTOC_PLATFORM=x86_64

FROM base AS platform-arm64
ENV PROTOC_PLATFORM=aarch_64

FROM platform-${BUILDARCH}

ENV LOCAL=/usr/local
ENV GOROOT=$LOCAL/go
ENV HOME=/root
ENV GOPATH=$HOME/go
ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH

RUN mkdir -p $GOPATH/bin

ENV PACKAGES curl gcc jq make unzip
RUN apt-get update
RUN apt-get install -y $PACKAGES

# Install Go
RUN curl -L https://go.dev/dl/go${GO_VERSION}.linux-$BUILDARCH.tar.gz | tar -C $LOCAL -xzf -

# Install Ignite
RUN curl -L https://get.ignite.com/cli@v${IGNITE_VERSION}! | bash

# Install Node
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION} | bash -
RUN apt-get install -y nodejs

# Install Mockgen
RUN go install github.com/golang/mock/mockgen@v${MOCKGEN_VERSION}

# Install ProtoC
RUN mkdir -p /usr/lib/protoc
WORKDIR /usr/lib/protoc
RUN curl -L https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-${PROTOC_PLATFORM}.zip -o protoc.zip
RUN unzip -o protoc.zip
RUN rm protoc.zip
RUN ln -s /usr/lib/protoc/bin/protoc ${LOCAL}/bin/protoc

RUN apt-get clean

EXPOSE 1317 4500 5000 26657 5173

WORKDIR /cifer

COPY go.mod /cifer/go.mod
RUN go mod download
RUN rm /cifer/go.mod

# Create the image
# $ docker build -f Dockerfile . -t cifer_i
# To test only 1 command
# $ docker run --rm -it -v $(pwd):/cifer -w /cifer cifer_i go test github.com/b9lab/cifer/x/cifer/keeper
# To build container
# $ docker create --name cifer -i -v $(pwd):/cifer -w /cifer -p 1317:1317 -p 3000:3000 -p 4500:4500 -p 5000:5000 -p 26657:26657 -p 5173:5173 cifer_i
# $ docker start cifer
# To run server on it
# $ docker exec -it cifer ignite chain serve --reset-once
# In other shell, to query it
# $ docker exec -it cifer npm run dev -- --host

# npm run dev -- --host
Loading

0 comments on commit b0e9256

Please sign in to comment.