Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
initiate project
Browse files Browse the repository at this point in the history
  • Loading branch information
zargarzadehm committed Nov 23, 2023
0 parents commit 4bd2e35
Show file tree
Hide file tree
Showing 11 changed files with 421 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.idea
node_modules
dist
Dockerfile
.dockerignore
.git*
README.md
45 changes: 45 additions & 0 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build and Push Docker Image

on:
release:
types: [published]

jobs:
build:
name: Build and Push Docker Image
runs-on: ubuntu-latest

steps:
- name: Checkout the Code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: ${{ vars.PLATFORM_LIST || 'linux/amd64' }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: rosen-bridge
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker Metadata action
uses: docker/metadata-action@v5
id: meta
with:
images: ghcr.io/rosen-bridge/tss-secret-generator

- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: ${{ vars.PLATFORM_LIST || 'linux/amd64' }}
push: true
tags: ${{ steps.meta.outputs.tags }}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
yarn.lock
.idea
node_modules
.nyc_output
coverage
dir
build
dist
.DS_Store
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.12.0
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:18.12-alpine

LABEL maintainer="rosen-bridge team <[email protected]>"
LABEL description="Docker image for generate tss secret owned by rosen-bridge organization."
LABEL org.label-schema.vcs-url="https://github.com/rosen-bridge/tss-secret-generator"

WORKDIR /app
COPY . .
RUN npm ci
RUN npm run build

ENTRYPOINT []
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# TSS Secret Generator
## Description

Generate Tss publicKey/secret

## Usage

### manually
- Install node 18.12 >= 0
- Run following commands:
```shell
git clone https://github.com/rosen-bridge/tss-secret-generator.git
cd tss-secret-generator/
npm install # Install dependencies
npm run build # Build project
npm secret:generat # Generate TSS secret
```

### docker usage
```shell
docker run -it --rm tss-secret-generator npm run secret:generat
```
6 changes: 6 additions & 0 deletions nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"watch": ["src"],
"ext": ".ts,.js",
"ignore": [],
"exec": "ts-node --experimental-specifier-resolution=node ./src/index.ts"
}
263 changes: 263 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "tss-secret-generator",
"version": "0.1.0",
"description": "",
"main": "dist/src/index.js",
"type": "module",
"scripts": {
"build": "tsc",
"secret:generat": "node --experimental-specifier-resolution=node ./dist/index.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"@rosen-bridge/tss": "^1.1.3"
},
"devDependencies": {
"typescript": "^4.9.5"
},
"engines": {
"node": ">=18.12.0"
}
}
Loading

0 comments on commit 4bd2e35

Please sign in to comment.