From 7f5feab5cfff0afdca3211d78fe2e41af49b5864 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 25 May 2020 21:10:29 +0200 Subject: [PATCH] Fix notifications, build ... --- .github/workflows/ci.yml | 20 +++++++++++++++++--- Dockerfile.pi | 41 ---------------------------------------- 2 files changed, 17 insertions(+), 44 deletions(-) delete mode 100644 Dockerfile.pi diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index faa71a4d1..86a210b0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,7 +101,7 @@ jobs: - name: Slack Notification uses: homoluctus/slatify@v1.8.0 - if: always() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) + if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) with: type: ${{ job.status }} job_name: '*Freqtrade CI ${{ matrix.os }}*' @@ -163,7 +163,7 @@ jobs: - name: Slack Notification uses: homoluctus/slatify@v1.8.0 - if: always() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) + if: failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) with: type: ${{ job.status }} job_name: '*Freqtrade CI windows*' @@ -199,6 +199,20 @@ jobs: env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + # Notify on slack only once - when CI completes (and after deploy) in case it's successfull + notify-complete: + needs: [ build, build_windows, docs_check ] + runs-on: ubuntu-latest + steps: + - name: Slack Notification + uses: homoluctus/slatify@v1.8.0 + if: always() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) + with: + type: ${{ job.status }} + job_name: '*Freqtrade CI*' + channel: '#notifications' + url: ${{ secrets.SLACK_WEBHOOK }} + deploy: needs: [ build, build_windows, docs_check ] runs-on: ubuntu-18.04 @@ -263,7 +277,7 @@ jobs: - name: Build Raspberry docker image env: IMAGE_NAME: freqtradeorg/freqtrade - BRANCH_NAME: ${{ steps.extract_branch.outputs.branch }} + BRANCH_NAME: ${{ steps.extract_branch.outputs.branch }}_pi run: | build_helpers/publish_docker_pi.sh diff --git a/Dockerfile.pi b/Dockerfile.pi deleted file mode 100644 index 279f85a04..000000000 --- a/Dockerfile.pi +++ /dev/null @@ -1,41 +0,0 @@ -FROM balenalib/raspberrypi3-debian:stretch - -RUN [ "cross-build-start" ] - -RUN apt-get update \ - && apt-get -y install wget curl build-essential libssl-dev libffi-dev \ - && apt-get clean - -# Prepare environment -RUN mkdir /freqtrade -WORKDIR /freqtrade - -# Install TA-lib -COPY build_helpers/ta-lib-0.4.0-src.tar.gz /freqtrade/ -RUN tar -xzf /freqtrade/ta-lib-0.4.0-src.tar.gz \ - && cd /freqtrade/ta-lib/ \ - && ./configure \ - && make \ - && make install \ - && rm /freqtrade/ta-lib-0.4.0-src.tar.gz - -ENV LD_LIBRARY_PATH /usr/local/lib - -# Install berryconda -RUN wget -q https://github.com/jjhelmus/berryconda/releases/download/v2.0.0/Berryconda3-2.0.0-Linux-armv7l.sh \ - && bash ./Berryconda3-2.0.0-Linux-armv7l.sh -b \ - && rm Berryconda3-2.0.0-Linux-armv7l.sh - -# Install dependencies -COPY requirements-common.txt /freqtrade/ -RUN ~/berryconda3/bin/conda install -y numpy pandas \ - && ~/berryconda3/bin/pip install -r requirements-common.txt --no-cache-dir - -# Install and execute -COPY . /freqtrade/ -RUN ~/berryconda3/bin/pip install -e . --no-cache-dir - -RUN [ "cross-build-end" ] - -ENTRYPOINT ["/root/berryconda3/bin/python","./freqtrade/main.py"] -CMD [ "trade" ]