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:
|
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
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue