CI: deployment workflow changes (#2527)

* chore: 📌 bump up appleboy/ssh-action to v0.1.8

Signed-off-by: Prashant Shahi <prashant@signoz.io>

* ci(deployments): 🔧 use SSH_KEY secret

Signed-off-by: Prashant Shahi <prashant@signoz.io>

* ci(staging-deployment): 👷 use main tag of OtelCollectors in Staging

Signed-off-by: Prashant Shahi <prashant@signoz.io>

---------

Signed-off-by: Prashant Shahi <prashant@signoz.io>
This commit is contained in:
Prashant Shahi 2023-03-31 00:12:29 +05:45 committed by GitHub
parent 1a0c76a43b
commit 36610c809e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -11,21 +11,23 @@ jobs:
environment: staging environment: staging
steps: steps:
- name: Executing remote ssh commands using ssh key - name: Executing remote ssh commands using ssh key
uses: appleboy/ssh-action@v0.1.6 uses: appleboy/ssh-action@v0.1.8
env: env:
GITHUB_BRANCH: develop GITHUB_BRANCH: develop
GITHUB_SHA: ${{ github.sha }} GITHUB_SHA: ${{ github.sha }}
with: with:
host: ${{ secrets.HOST_DNS }} host: ${{ secrets.HOST_DNS }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
key: ${{ secrets.EC2_SSH_KEY }} key: ${{ secrets.SSH_KEY }}
envs: GITHUB_BRANCH,GITHUB_SHA envs: GITHUB_BRANCH,GITHUB_SHA
command_timeout: 60m command_timeout: 60m
script: | script: |
echo "GITHUB_BRANCH: ${GITHUB_BRANCH}" echo "GITHUB_BRANCH: ${GITHUB_BRANCH}"
echo "GITHUB_SHA: ${GITHUB_SHA}" echo "GITHUB_SHA: ${GITHUB_SHA}"
export DOCKER_TAG="${GITHUB_SHA:0:7}" # needed for child process to access it export DOCKER_TAG="${GITHUB_SHA:0:7}" # needed for child process to access it
export OTELCOL_TAG="main"
docker system prune --force docker system prune --force
docker pull signoz/signoz-otel-collector:main
cd ~/signoz cd ~/signoz
git status git status
git add . git add .

View File

@ -11,14 +11,14 @@ jobs:
if: ${{ github.event.label.name == 'testing-deploy' }} if: ${{ github.event.label.name == 'testing-deploy' }}
steps: steps:
- name: Executing remote ssh commands using ssh key - name: Executing remote ssh commands using ssh key
uses: appleboy/ssh-action@v0.1.6 uses: appleboy/ssh-action@v0.1.8
env: env:
GITHUB_BRANCH: ${{ github.head_ref || github.ref_name }} GITHUB_BRANCH: ${{ github.head_ref || github.ref_name }}
GITHUB_SHA: ${{ github.sha }} GITHUB_SHA: ${{ github.sha }}
with: with:
host: ${{ secrets.HOST_DNS }} host: ${{ secrets.HOST_DNS }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
key: ${{ secrets.EC2_SSH_KEY }} key: ${{ secrets.SSH_KEY }}
envs: GITHUB_BRANCH,GITHUB_SHA envs: GITHUB_BRANCH,GITHUB_SHA
command_timeout: 60m command_timeout: 60m
script: | script: |