From ff3044f6dc5af7432ffe51e9f8c226e31541b761 Mon Sep 17 00:00:00 2001 From: Ilya Baidakov <90848485+baidakovil@users.noreply.github.com> Date: Fri, 8 Dec 2023 21:17:37 +0300 Subject: [PATCH 1/6] Update README.md --- README.md | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index bf43bdb..a8f1342 100755 --- a/README.md +++ b/README.md @@ -1,19 +1,12 @@ # GreenGrassBot +[![Pylint](https://github.com/baidakovil/GreenGrassBot/actions/workflows/pylint-workflow.yml/badge.svg)](https://github.com/baidakovil/GreenGrassBot/actions/workflows/pylint-workflow.yml) [![Docker](https://github.com/baidakovil/GreenGrassBot/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/baidakovil/GreenGrassBot/actions/workflows/docker-publish.yml) -![Pylint Automated Workflow](https://github.com/baidakovil/greengrassbot/actions/workflows/pylint-workflow_dispatch.yml/badge.svg) +#### Nice metrics: +![GitHub commit activity (branch)](https://img.shields.io/github/commit-activity/m/baidakovil/GreenGrassBot) - -## Nice and Bads - -| **What's nice** |**Nice metric** | -|---------------------------|---------------------------------------------------------------------------------------------------------------| -| I am the only contributor | ![GitHub commit activity (branch)](https://img.shields.io/github/commit-activity/m/baidakovil/GreenGrassBot)| - - -| **What's bad** |**Bad metric** | -|---------------------------|---------------------------------------------------------------------------------------------------------------| -| I am the only contributor | ![GitHub contributors](https://img.shields.io/github/contributors/baidakovil/GreenGrassBot) | +#### Metrics to make prettier: +![GitHub contributors](https://img.shields.io/github/contributors/baidakovil/GreenGrassBot) Green Grass Telegram Bot is a notificator abour music events. From 237133446d7aa093bbeb7b82ee6415a83950697e Mon Sep 17 00:00:00 2001 From: Ilya Baidakov <90848485+baidakovil@users.noreply.github.com> Date: Fri, 8 Dec 2023 21:18:52 +0300 Subject: [PATCH 2/6] Delete .github/workflows/docker-image.yml --- .github/workflows/docker-image.yml | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml deleted file mode 100644 index d657a63..0000000 --- a/.github/workflows/docker-image.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Docker Image CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) From 7928505c2111ca5154626883e5f1a53b7b86f8ec Mon Sep 17 00:00:00 2001 From: Ilya Baidakov <90848485+baidakovil@users.noreply.github.com> Date: Fri, 8 Dec 2023 21:27:48 +0300 Subject: [PATCH 3/6] Create deployment.yml Add this to restart without password % ALL=(ALL) NOPASSWD: /bin/systemctl restart --- .github/workflows/deployment.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/deployment.yml diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml new file mode 100644 index 0000000..839ccc4 --- /dev/null +++ b/.github/workflows/deployment.yml @@ -0,0 +1,17 @@ +name: Deployment + +on: + workflow_dispatch: + +jobs: + deploy: + name: Deploy + runs-on: ubuntu-latest + steps: + - name: executing deployment script + uses: appleboy/ssh-action@v0.1.10 + with: + host: ${{ secrets.DEPLOYMENT_HOST }} + username: ${{ secrets.DEPLOYMENT_USERNAME }} + password: ${{ secrets.DEPLOYMENT_PASSWORD }} + script: cd $HOME/${{ secrets.DEPLOYMENT_FOLDER }} && git pull && sudo systemctl restart ${{ secrets.DEPLOYMENT_SERVICE }} From aaaedf7f8c5839e09ec626a4c8c3f6f25fde9421 Mon Sep 17 00:00:00 2001 From: Ilya Baidakov <90848485+baidakovil@users.noreply.github.com> Date: Fri, 8 Dec 2023 21:33:37 +0300 Subject: [PATCH 4/6] Update docker-publish.yml --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 3fc1de1..df7b9e0 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -1,4 +1,4 @@ -name: Docker +name: Docker Hub Publish # This workflow uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by From 1dea6383cdbc1369c782f5222013bb4b09413afd Mon Sep 17 00:00:00 2001 From: Ilya Baidakov <90848485+baidakovil@users.noreply.github.com> Date: Fri, 8 Dec 2023 21:36:17 +0300 Subject: [PATCH 5/6] upd: run after Docker Hub Publish workflow --- .github/workflows/deployment.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 839ccc4..92cd1c4 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -2,7 +2,10 @@ name: Deployment on: workflow_dispatch: - + workflow_run: + workflows: ["Docker Hub Publish"] + types: + - completed jobs: deploy: name: Deploy From 87c3c7f4f0fc3edc665aa9d60c7b9a0ecbc939b1 Mon Sep 17 00:00:00 2001 From: Ilya Baidakov <90848485+baidakovil@users.noreply.github.com> Date: Fri, 8 Dec 2023 21:37:34 +0300 Subject: [PATCH 6/6] upd: Deployment badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a8f1342..cc5fbd4 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # GreenGrassBot -[![Pylint](https://github.com/baidakovil/GreenGrassBot/actions/workflows/pylint-workflow.yml/badge.svg)](https://github.com/baidakovil/GreenGrassBot/actions/workflows/pylint-workflow.yml) [![Docker](https://github.com/baidakovil/GreenGrassBot/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/baidakovil/GreenGrassBot/actions/workflows/docker-publish.yml) +[![Pylint](https://github.com/baidakovil/GreenGrassBot/actions/workflows/pylint-workflow.yml/badge.svg)](https://github.com/baidakovil/GreenGrassBot/actions/workflows/pylint-workflow.yml) [![Docker](https://github.com/baidakovil/GreenGrassBot/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/baidakovil/GreenGrassBot/actions/workflows/docker-publish.yml) [![Deployment](https://github.com/baidakovil/GreenGrassBot/actions/workflows/deployment.yml/badge.svg)](https://github.com/baidakovil/GreenGrassBot/actions/workflows/deployment.yml) #### Nice metrics: ![GitHub commit activity (branch)](https://img.shields.io/github/commit-activity/m/baidakovil/GreenGrassBot)