Skip to content

Commit

Permalink
Merge pull request #51 from patbaumgartner/master
Browse files Browse the repository at this point in the history
[Fix] Fixed formatting for new listing & adding github action support
  • Loading branch information
brianleect authored Aug 22, 2021
2 parents 3a70bc1 + 96f7025 commit f45ea14
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 4 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.env
.idea
.gitignore

venv

Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This is a basic workflow to help you get started with Actions

name: Publish Docker image

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: patbaumgartner/binance-pump-alerts

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,6 @@ USER bpauser

COPY --chown=bpauser:bpauser . /binance-pump-alerts/

RUN chmod a+x entrypoint.sh

ENTRYPOINT ["./entrypoint.sh", "python", "pumpAlerts.py"]
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ services:
build:
context: .
dockerfile: "./Dockerfile"
image: binance-pump-alerts
image: patbaumgartner/binance-pump-alerts:latest
# image: brianleect/binance-pump-alerts:latest
restart: "no"
environment:
- CONFIG_FILE=config.dev.yml
- TELEGRAM_TOKEN=${TELEGRAM_TOKEN}
- TELEGRAM_CHAT_ID=${TELEGRAM_CHAT_ID}
- TELEGRAM_ALERT_CHAT_ID=${TELEGRAM_ALERT_CHAT_ID}
Expand Down
4 changes: 2 additions & 2 deletions reporter/ReportGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ def send_new_listings(self, symbols_to_add):
*New Listings*"
{0} new pairs found, adding to monitored list."
*Adding Pairs:*
\
*Adding Pairs:*\
""".format(
len(symbols_to_add)
)

message = "\n"
for symbol in symbols_to_add:
message += "- _{0}_\n".format(symbol)

Expand Down

0 comments on commit f45ea14

Please sign in to comment.