Skip to content

Commit

Permalink
Updated github related (chrisleekr#46)
Browse files Browse the repository at this point in the history
* Updated Github issue templates
* Updated Github actions
* Added contributors to README.md
  • Loading branch information
chrisleekr authored Mar 19, 2021
1 parent 71b3ac5 commit bcc0e85
Show file tree
Hide file tree
Showing 8 changed files with 170 additions and 52 deletions.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: '🐞 Bug report'
about: Create a bug report
title: ''
labels: 'bug'
assignees: ''
---

## Description

<!-- A clear and concise description of the bug. -->
<!-- The sections suggested are intended to make it easy to create a descriptive bug report. -->
<!-- Change as needed! -->

## To Reproduce

<!-- Steps to reproduce the bug. -->

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

## Expected Behaviours

<!-- A description of what you expected to happen. -->

## Screenshots

<!-- Would including screenshots help explain the problem? -->

## Additional context

<!-- Is there any additional context that would be helpful? -->
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: '🚀 Feature request'
about: Suggest an idea
title: ''
labels: 'enhancement'
assignees: ''
---

### Is your proposal related to a problem?

<!-- Provide a clear and concise description of what the problem is. For example,
"I'm always frustrated when..." -->

### Describe the solution you'd like

<!-- Provide a clear and concise description of what you want to happen. Describe
your proposed solution here. -->

### Describe alternatives you've considered

<!-- Let us know about other solutions you've tried or researched. -->

### Additional context

<!-- Is there anything else you can add about the proposal? You might want to link
to related issues here, if you haven't already. -->
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/questions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: '❓ Question'
about: Question
title: ''
labels: 'question'
assignees: ''
---

<!-- Provide describe your question. Make sure you search the closed issues before
posting a new question. -->
22 changes: 22 additions & 0 deletions .github/workflows/bump-versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Bump versions

on: [workflow_dispatch]

jobs:
bump-versions:
name: Bump versions
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Bump Version (Patch)
if:
github.repository == 'chrisleekr/binance-trading-bot' && github.ref ==
'refs/heads/master'
run: |
git config --global user.email ${{ secrets.GIT_CI_EMAIL }}
git config --global user.name ${{ secrets.GIT_CI_NAME }}
PACKAGE_VERSION=$(npm version patch -m "Update version to %s [skip ci]")
git status
git push https://${{ secrets.GIT_CI_USERNAME }}:${{ secrets.GIT_CI_PASSWORD }}@${{ secrets.GIT_REPO_DOMAIN }}/chrisleekr/binance-trading-bot.git HEAD:$GITHUB_REF
git push https://${{ secrets.GIT_CI_USERNAME }}:${{ secrets.GIT_CI_PASSWORD }}@${{ secrets.GIT_REPO_DOMAIN }}/chrisleekr/binance-trading-bot.git $PACKAGE_VERSION
50 changes: 0 additions & 50 deletions .github/workflows/main.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Push

on: [push, workflow_dispatch]

env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

jobs:
lint-and-test:
name: Lint & Test
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Testing
run: |
npm install
npm run lint
npm run test
bash <(curl -s https://codecov.io/bash)
add-contributors:
name: Add contributors
if:
github.repository == 'chrisleekr/binance-trading-bot' && github.ref ==
'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Run add-contributors action
uses: BobAnkh/add-contributors@master
with:
REPO_NAME: 'chrisleekr/binance-trading-bot'
CONTRIBUTOR: '## Contributors'
COLUMN_PER_ROW: '6'
ACCESS_TOKEN: ${{secrets.GITHUB_TOKEN}}
IMG_WIDTH: '100'
FONT_SIZE: '14'
PATH: '/README.md'
COMMIT_MESSAGE: 'Update contributors to README.md [skip ci]'
AVATAR_SHAPE: 'round'
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
create-release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: false
- name: Build/Push production docker image
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin ${{ secrets.REGISTRY_DOMAIN }}
PACKAGE_VERSION=$(grep version package.json | cut -c 15- | rev | cut -c 3- | rev)
docker build . --build-arg PACKAGE_VERSION=$PACKAGE_VERSION --build-arg NODE_ENV=production --target production-stage -t ${{ secrets.REGISTRY_DOMAIN }}/chrisleekr/binance-trading-bot:latest -t ${{ secrets.REGISTRY_DOMAIN }}/chrisleekr/binance-trading-bot:$PACKAGE_VERSION
docker push ${{ secrets.REGISTRY_DOMAIN }}/chrisleekr/binance-trading-bot:$PACKAGE_VERSION
docker push ${{ secrets.REGISTRY_DOMAIN }}/chrisleekr/binance-trading-bot:latest
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Binance Trading Bot

[![GitHub package.json version](https://img.shields.io/github/package-json/v/chrisleekr/binance-trading-bot)](https://github.com/chrisleekr/binance-trading-bot/releases)
[![GitHub version](https://img.shields.io/github/package-json/v/chrisleekr/binance-trading-bot)](https://github.com/chrisleekr/binance-trading-bot/releases)
[![Build](https://github.com/chrisleekr/binance-trading-bot/workflows/main/badge.svg)](https://github.com/chrisleekr/binance-trading-bot/actions?query=workflow%3Amain)
[![CodeCov](https://codecov.io/gh/chrisleekr/binance-trading-bot/branch/master/graph/badge.svg)](https://codecov.io/gh/chrisleekr/binance-trading-bot)
[![Docker pull](https://img.shields.io/docker/pulls/chrisleekr/binance-trading-bot)](https://hub.docker.com/r/chrisleekr/binance-trading-bot)
[![GitHub contributors](https://img.shields.io/github/contributors/chrisleekr/binance-trading-bot)](https://github.com/chrisleekr/binance-trading-bot/graphs/contributors)
[![MIT License](https://img.shields.io/github/license/chrisleekr/binance-trading-bot)](https://github.com/chrisleekr/binance-trading-bot/blob/master/LICENSE)

> Automated Binance trading bot with trailing buy/sell strategy
Expand Down Expand Up @@ -316,4 +317,5 @@ Or use the frontend to adjust configurations after launching the application.
- [@d0x2f](https://github.com/d0x2f)
- [@Maxoos](https://github.com/Maxoos)
- [@OOtta](https://github.com/OOtta)
- [@thamlth](https://github.com/thamlth)

## Contributors

0 comments on commit bcc0e85

Please sign in to comment.