From 52a45908a8fe3013acc15b076b77de6d76167704 Mon Sep 17 00:00:00 2001 From: mdr223 Date: Fri, 11 Aug 2023 12:48:17 -0400 Subject: [PATCH] trying to run simple script on submit via ci --- .github/workflows/ci-cd.yaml | 11 +++++------ deploy/install.sh | 4 ++++ deploy/ssh_config | 7 +++++++ 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100755 deploy/install.sh create mode 100644 deploy/ssh_config diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml index 5af20c1..a9fa84b 100644 --- a/.github/workflows/ci-cd.yaml +++ b/.github/workflows/ci-cd.yaml @@ -9,12 +9,11 @@ jobs: - uses: actions/checkout@v3 - run: echo "The ${{ github.repository }} repository has been cloned to the runner." - run: | - ls -a ~ - ls ~/.ssh/ - cat ~/.ssh/config - # - run: | - # touch ~/.ssh/id_rsa_submit - # echo ${{ secrets.SSH_PRIVATE_KEY_MDRUSSO }} >> ~/.ssh/id_rsa_submit + mkdir ~/.ssh/ + touch ~/.ssh/config + echo ${{ secrets.SSH_PRIVATE_KEY_MDRUSSO }} >> ~/.ssh/id_rsa_submit + cp ${{ github.workspace}}/deploy/ssh_config ~/.ssh/config + ssh submit 'bash -s' < ${{ github.workspace }}/deploy/install.sh # - uses: webfactory/ssh-agent@v0.8.0 # with: diff --git a/deploy/install.sh b/deploy/install.sh new file mode 100755 index 0000000..ee54dbc --- /dev/null +++ b/deploy/install.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +echo `pwd` + diff --git a/deploy/ssh_config b/deploy/ssh_config new file mode 100644 index 0000000..f5c46ff --- /dev/null +++ b/deploy/ssh_config @@ -0,0 +1,7 @@ +Host submit + HostName submit.mit.edu + User mdrusso + IdentitiesOnly=yes + PreferredAuthentications publickey + PasswordAuthentication no + IdentityFile ~/.ssh/id_rsa_submit