From 8480bc789dc7c62542ae7c490776fab35ca997ee Mon Sep 17 00:00:00 2001 From: Patrick Baumgartner Date: Fri, 20 Aug 2021 12:16:57 +0200 Subject: [PATCH 1/5] Fixed formatting for new listing --- reporter/ReportGenerator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reporter/ReportGenerator.py b/reporter/ReportGenerator.py index 7eb72c5..3f6767d 100644 --- a/reporter/ReportGenerator.py +++ b/reporter/ReportGenerator.py @@ -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) From 3733d5e4dc63329999402b42f4a9825db92d32b0 Mon Sep 17 00:00:00 2001 From: Patrick Baumgartner Date: Sun, 22 Aug 2021 10:28:02 +0200 Subject: [PATCH 2/5] Cleanup --- .dockerignore | 1 + docker-compose.yml | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index 1952f7c..5ad1df2 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,6 @@ .env .idea +.gitignore venv diff --git a/docker-compose.yml b/docker-compose.yml index 1e41381..8492e09 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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} From 3245588dca8fd2b7d53b02c63a56bc2b21f77edb Mon Sep 17 00:00:00 2001 From: Patrick Baumgartner Date: Sun, 22 Aug 2021 12:13:54 +0200 Subject: [PATCH 3/5] Create main.yml --- .github/workflows/main.yml | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..441b66a --- /dev/null +++ b/.github/workflows/main.yml @@ -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: my-docker-hub-namespace/my-docker-hub-repository + + - 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 }} From 59824909c91b1c81d4e71a4f3408802795e4606e Mon Sep 17 00:00:00 2001 From: Patrick Baumgartner Date: Sun, 22 Aug 2021 12:22:26 +0200 Subject: [PATCH 4/5] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 441b66a..d4a2253 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,7 @@ jobs: id: meta uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 with: - images: my-docker-hub-namespace/my-docker-hub-repository + images: patbaumgartner/binance-pump-alerts - name: Build and push Docker image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc From 96f7025d032bd5c91ef020984288aca2feea6fd6 Mon Sep 17 00:00:00 2001 From: Patrick Baumgartner Date: Sun, 22 Aug 2021 12:35:10 +0200 Subject: [PATCH 5/5] Changing permissions on entrypoing for running with github actions --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 784ee11..e49beff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"]