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:
parent
0ab160f67a
commit
ec88ecc576
2 changed files with 8 additions and 2 deletions
4
.github/workflows/verify-on-container.yml
vendored
4
.github/workflows/verify-on-container.yml
vendored
|
@ -22,7 +22,7 @@ jobs:
|
|||
with:
|
||||
key: ${{ secrets.SSH_KEY }}
|
||||
known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
||||
- name: move .ssh to /root
|
||||
run: mv ~/.ssh /root
|
||||
- name: print created files
|
||||
run: ls -l ~/.ssh
|
||||
- name: git clone through SSH
|
||||
run: git clone git@github.com:shimataro/ssh-key-action.git tmp
|
||||
|
|
|
@ -84,6 +84,12 @@ function getHomeDirectory(): string
|
|||
throw Error(`${homeEnv} is not defined`);
|
||||
}
|
||||
|
||||
if(home === "/github/home")
|
||||
{
|
||||
// Docker container
|
||||
return "/root";
|
||||
}
|
||||
|
||||
return home;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue