From fa74a4125714940dbfe6789354828ae2dd17be1c Mon Sep 17 00:00:00 2001 From: H4CK3R-01 Date: Tue, 3 May 2022 10:52:30 +0200 Subject: [PATCH] Added dependabot config, woodpecker pipeline and docker-compose --- .deploy/docker-compose.yml | 12 +++++++++ .github/dependabot.yml | 18 +++++++++++++ .woodpecker/pipeline.yml | 54 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 .deploy/docker-compose.yml create mode 100644 .github/dependabot.yml create mode 100644 .woodpecker/pipeline.yml diff --git a/.deploy/docker-compose.yml b/.deploy/docker-compose.yml new file mode 100644 index 0000000..4f85387 --- /dev/null +++ b/.deploy/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3.7' + +services: + aktienbot_bot: + image: registry.flokaiser.com/guesstheprice/bot + env_file: + - ${PWD}/.env + +networks: + default: + external: + name: ens18_net \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..93b5b96 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,18 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + # Bot + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "daily" + assignees: + - "NormalParameter" + - "Rripped" + - "FlorianKellermann" + - "H4CK3R-01" + open-pull-requests-limit: 100 \ No newline at end of file diff --git a/.woodpecker/pipeline.yml b/.woodpecker/pipeline.yml new file mode 100644 index 0000000..80277ba --- /dev/null +++ b/.woodpecker/pipeline.yml @@ -0,0 +1,54 @@ +pipeline: + generate_docker_tag: + image: golang + commands: + - echo -n "${CI_COMMIT_BRANCH//\//-}-${CI_COMMIT_SHA:0:8}, latest" > .tags + when: + path: [ "source/**" ] + event: push + + + # -------------------------------------- Bot -------------------------------------- + build_bot: + image: woodpeckerci/plugin-docker-buildx + settings: + repo: + from_secret: repo_bot + username: + from_secret: username + password: + from_secret: password + registry: + from_secret: registry + dockerfile: source/Dockerfile + platforms: linux/amd64 + when: + path: "source/**" + event: push + + + # -------------------------------------- Deploy -------------------------------------- + deploy: + image: appleboy/drone-ssh + network_mode: host + settings: + host: + from_secret: ssh_host + username: + from_secret: ssh_user + password: + from_secret: ssh_password + port: + from_secret: ssh_port + script: + - cd /home/administrator/GuessThePrice + - git pull + - cd deploy + - docker-compose pull + - docker-compose -p "guesstheprice" up -d + when: + path: [ "source/**" ] + event: push + + +branches: main \ No newline at end of file