From 12b4446b2f177724fed38c33367d847e015cf18d Mon Sep 17 00:00:00 2001 From: Chengming Li Date: Thu, 4 Apr 2024 19:05:40 -0700 Subject: [PATCH] test --- .github/workflows/cd-branch.yml | 16 ++++++++-------- .github/workflows/cd-master.yml | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cd-branch.yml b/.github/workflows/cd-branch.yml index eec3f0e16..73e4950d5 100644 --- a/.github/workflows/cd-branch.yml +++ b/.github/workflows/cd-branch.yml @@ -10,13 +10,12 @@ jobs: runs-on: ubuntu-latest steps: - - name: SSH into Hozer - uses: appleboy/ssh-action@v1.0.3 - with: - host: hozer-51.ocf.berkeley.edu - username: root - key: ${{ secrets.SSH_KEY }} - script: | + - name: SSH + run: | + mkdir -p ~/.ssh + echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh -i ~/.ssh/id_rsa root@hozer-51.ocf.berkeley.edu << EOF cd /berkeleytime git checkout ${{ github.event.pull_request.head.sha }} git pull @@ -32,4 +31,5 @@ jobs: --set redisUri=redis://bt-dev-redis-master.bt.svc.cluster.local:6379 \ --set nodeEnv=development \ --set frontend.image.tag=${{ github.event.pull_request.head.sha }} \ - --set backend.image.tag=${{ github.event.pull_request.head.sha }} \ No newline at end of file + --set backend.image.tag=${{ github.event.pull_request.head.sha }} + EOF \ No newline at end of file diff --git a/.github/workflows/cd-master.yml b/.github/workflows/cd-master.yml index f8e784b99..37d20774f 100644 --- a/.github/workflows/cd-master.yml +++ b/.github/workflows/cd-master.yml @@ -10,13 +10,12 @@ jobs: runs-on: ubuntu-latest steps: - - name: SSH into Hozer - uses: appleboy/ssh-action@v1.0.3 - with: - host: hozer-51.ocf.berkeley.edu - username: root - key: ${{ secrets.SSH_KEY }} - script: | + - name: SSH + run: | + mkdir -p ~/.ssh + echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh -i ~/.ssh/id_rsa root@hozer-51.ocf.berkeley.edu << EOF cd /berkeleytime git checkout master git pull @@ -27,4 +26,5 @@ jobs: docker push octoberkeleytime/bt-backend:latest docker push octoberkeleytime/bt-frontend:latest kubectl rollout restart deployment bt-staging-app-backend - kubectl rollout restart deployment bt-staging-app-frontend \ No newline at end of file + kubectl rollout restart deployment bt-staging-app-frontend + EOF \ No newline at end of file