Skip to content

Merge branch 'main' of github.com:db1group/sonar-metrics-collector #42

Merge branch 'main' of github.com:db1group/sonar-metrics-collector

Merge branch 'main' of github.com:db1group/sonar-metrics-collector #42

Workflow file for this run

name: CD-Sonar Metrics Collector
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
name: Deploy-ssh
runs-on: ubuntu-latest
steps:
- name: Executing remote ssh commands
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
port: ${{ secrets.SSH_PORT }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd db1-projects/sonar-metrics-collector/;
docker container stop sonar-metrics-collector;
docker rm sonar-metrics-collector;
git pull origin main;
docker rmi sonar-metrics-collector;
docker build -t sonar-metrics-collector .;
docker run -d -t -i -p 5100:5100 --net metrics-collector --name sonar-metrics-collector sonar-metrics-collector:latest npm run start:prod