Skip to content

Commit

Permalink
Merge pull request CCI-MOC#20 from QuanMPhm/18/clone_nonbillables
Browse files Browse the repository at this point in the history
Added a script to clone nonbillable information using deploy keys
  • Loading branch information
knikolla authored Apr 19, 2024
2 parents cd5c6cc + c27d523 commit c54a956
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tools/clone_nonbillables_and_process.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
set -xe

# Add deploy key to ssh config
mkdir -p ~/.ssh
if [ ! -e ~/.ssh/config ]; then
touch ~/.ssh/config
touch ~/.ssh/id_nonbillable
echo "
Host github-nonbillable
HostName github.com
IdentityFile ~/.ssh/id_nonbillable
" > ~/.ssh/config
echo "$GH_NONBILLABLE_DEPLOYKEY" > ~/.ssh/id_nonbillable
chmod 600 ~/.ssh/id_nonbillable
fi

if [ ! -d ./non-billable-projects ]; then
git clone git@github-nonbillable:CCI-MOC/non-billable-projects.git ./non-billable-projects
fi

0 comments on commit c54a956

Please sign in to comment.