1
0
Fork 0
mirror of https://github.com/shimataro/ssh-key-action.git synced 2025-06-19 22:52:10 +10:00

change home directory for Docker container

This commit is contained in:
shimataro 2021-02-08 22:59:08 +09:00
parent 0ab160f67a
commit ec88ecc576
No known key found for this signature in database
GPG key ID: BE92C05736911A9D
2 changed files with 8 additions and 2 deletions

View file

@ -22,7 +22,7 @@ jobs:
with: with:
key: ${{ secrets.SSH_KEY }} key: ${{ secrets.SSH_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }} known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: move .ssh to /root - name: print created files
run: mv ~/.ssh /root run: ls -l ~/.ssh
- name: git clone through SSH - name: git clone through SSH
run: git clone git@github.com:shimataro/ssh-key-action.git tmp run: git clone git@github.com:shimataro/ssh-key-action.git tmp

View file

@ -84,6 +84,12 @@ function getHomeDirectory(): string
throw Error(`${homeEnv} is not defined`); throw Error(`${homeEnv} is not defined`);
} }
if(home === "/github/home")
{
// Docker container
return "/root";
}
return home; return home;
} }