mirror of
https://github.com/game-ci/unity-test-runner.git
synced 2026-01-28 21:59:06 +08:00
add sshPublicKeysDirectoryPath and GIT_CONFIG_EXTENSIONS parameters that adds git configs and mounts .ssh/config and public keys to the container, in order to allow multiple sh deploy key trick by webplatform@ssh-agent (#240)
This commit is contained in:
1
dist/entrypoint.sh
vendored
1
dist/entrypoint.sh
vendored
@@ -12,6 +12,7 @@ mkdir -p "$ACTIVATE_LICENSE_PATH"
|
||||
#
|
||||
|
||||
source /steps/activate.sh
|
||||
source /steps/set_extra_git_configs.sh
|
||||
source /steps/set_gitcredential.sh
|
||||
source /steps/run_tests.sh
|
||||
source /steps/return_license.sh
|
||||
|
||||
2364
dist/index.js
generated
vendored
2364
dist/index.js
generated
vendored
File diff suppressed because it is too large
Load Diff
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
29
dist/steps/set_extra_git_configs.sh
vendored
Normal file
29
dist/steps/set_extra_git_configs.sh
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "${GIT_CONFIG_EXTENSIONS}" ]
|
||||
then
|
||||
echo "GIT_CONFIG_EXTENSIONS unset skipping"
|
||||
else
|
||||
echo "GIT_CONFIG_EXTENSIONS is set. configuring extra git configs"
|
||||
|
||||
IFS=$'\n'
|
||||
for config in $(echo "${GIT_CONFIG_EXTENSIONS}" | sed 's/\(.*\)=\(.*\)/"\1" "\2"/g'); do
|
||||
if [[ $config =~ \"([^\"]+)\"\ \"([^\"]+)\" ]]; then
|
||||
key="${BASH_REMATCH[1]}"
|
||||
value="${BASH_REMATCH[2]}"
|
||||
else
|
||||
echo "Error parsing config: $config"
|
||||
exit 1
|
||||
fi
|
||||
echo "Adding extra git config: \"$key\" = \"$value\""
|
||||
git config --global --add "$key" "$value"
|
||||
done
|
||||
unset IFS
|
||||
|
||||
fi
|
||||
|
||||
echo "---------- git config --list -------------"
|
||||
git config --list
|
||||
|
||||
echo "---------- git config --list --show-origin -------------"
|
||||
git config --list --show-origin
|
||||
Reference in New Issue
Block a user