Skip to content

Commit

Permalink
~/.ssh/id_rsa
Browse files Browse the repository at this point in the history
  • Loading branch information
banterCZ committed Oct 13, 2023
1 parent ed8f1bf commit b608139
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/scp-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,25 @@ jobs:
env:
INTERNAL_USERNAME: ${{ secrets.JFROG_USERNAME }}
INTERNAL_PASSWORD: ${{ secrets.JFROG_PASSWORD }}
- name: Setup SSH Keys and known_hosts
- name: Set up SSH key
run: |
ssh-agent -a /tmp/ssh_agent.sock > /dev/null
ssh-add - <<< "${{ secrets.SCP_CERTIFICATE }}"
mkdir -p ~/.ssh
echo "${{ secrets.SCP_CERTIFICATE }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa {{ secrets.SCP_HOST }} >> ~/.ssh/known_hosts
- name: Deploy enrollment-server.war
shell: bash
run: |
scp -o 'StrictHostKeyChecking no' enrollment-server-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server.war
scp -o 'StrictHostKeyChecking no' -i ~/.ssh/id_rsa enrollment-server-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server.war
- name: Deploy enrollment-server-onboarding.war
shell: bash
run: |
scp -o 'StrictHostKeyChecking no' enrollment-server-onboarding-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-onboarding.war
scp -o 'StrictHostKeyChecking no' -i ~/.ssh/id_rsa enrollment-server-onboarding-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-onboarding.war
- name: Deploy enrollment-server.war mock
shell: bash
run: |
scp -o 'StrictHostKeyChecking no' enrollment-server-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-mock.war
scp -o 'StrictHostKeyChecking no' -i ~/.ssh/id_rsa enrollment-server-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-mock.war
- name: Deploy enrollment-server-onboarding.war mock
shell: bash
run: |
scp -o 'StrictHostKeyChecking no' enrollment-server-onboarding-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-onboarding-mock.war
scp -o 'StrictHostKeyChecking no' -i ~/.ssh/id_rsa enrollment-server-onboarding-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-onboarding-mock.war

0 comments on commit b608139

Please sign in to comment.