Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
0237h committed Aug 28, 2024
1 parent b6f3183 commit 4fa011d
Show file tree
Hide file tree
Showing 45 changed files with 4,487 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# API Server
PORT=8080
HOSTNAME=localhost

# Clickhouse Database
HOST=http://127.0.0.1:8123
DATABASE=default
USERNAME=default
PASSWORD=
MAX_LIMIT=500

# Logging
VERBOSE=true
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: 0237h

---

<!--- Required, provide a general summary of the issue in the Title above -->

## Expected Behavior
<!--- Required, provide a detailed description of the expected behavior -->

## Current Behavior
<!--- Required, provide a detailed description of the current behavior -->

## How to reproduce
<!--- Required, please provide a checklist of steps to reproduce the bug -->

## Possible Solution
<!--- Optional, but you can suggest an idea for implementing a fix -->

## Screenshots
<!--- Optional, if applicable you can add screenshots to help explain your problem -->

## Environment
<!--- Required, please specify which version you are running as well as information about your environment -->
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature
assignees: 0237h

---

<!--- Required, provide a general summary of the feature in the Title above -->

## Detailed description
<!--- Required, provide a detailed description of the change or addition you are proposing -->

## Context
<!--- Required, why is this change important to you ? How would you use it ? How can it benefit other users ? -->

## Possible implementation
<!--- Optional, but suggest an idea for implementing addition or change -->

## Other alternatives
<!--- Optional, but suggest if this feature could be integrated in a different way or what could be subject to discussion -->
56 changes: 56 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '✨ Features'
labels:
- 'feature'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '📝 Documentation'
labels:
- 'documentation'
- title: '🔧 Operations'
label: 'ops'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## Changes
$CHANGES
**Full Changelog**: https://github.com/pinax-network/antelope-transactions-api/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
autolabeler:
- label: 'documentation'
branch:
- '/docs\/.+/'
files:
- '*.md'
- label: 'bug'
branch:
- '/fix\/.+/'
- label: 'feature'
branch:
- '/feature\/.+/'
- label: 'ops'
branch:
- '/ops\/.+/'
files:
- '.github/*.yml'
- '.github/workflows/*.yml'
- '.gitignore'
- 'tsconfig.json'
- 'Dockerfile'
27 changes: 27 additions & 0 deletions .github/workflows/bun-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build
on:
release:
types: [ published ]

permissions:
contents: write

jobs:
bun-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: 'Install Dependencies'
run: bun install

- name: 'Build app'
run: bun run build

- uses: softprops/action-gh-release@v1
with:
files: |
antelope-transactions-api
31 changes: 31 additions & 0 deletions .github/workflows/bun-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test

on: push

jobs:
bun-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install bun
uses: oven-sh/setup-bun@v1

- name: 'Install Dependencies'
run: |
bun install
- name: 'Run lint'
run: |
bun lint
- name: 'Run test'
run: |
bun test
env:
PORT: ${{ vars.PORT }}
HOSTNAME: ${{ vars.HOSTNAME }}
HOST: ${{ vars.HOST }}
USERNAME: ${{ secrets.USERNAME }}
PASSWORD: ${{ secrets.PASSWORD }}
47 changes: 47 additions & 0 deletions .github/workflows/ghcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: GitHub Container Registry
on:
push:
tags:
- "v*"
branches:
- "*"

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
ghcr:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

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

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,prefix=,suffix=-{{date 'X'}}
type=raw,enable=${{ !startsWith(github.ref, 'refs/tags/') }},value=develop
type=semver,pattern={{raw}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
22 changes: 22 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release Drafter

on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]

permissions:
contents: read

jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 4fa011d

Please sign in to comment.