get chrome sign key from env
This commit is contained in:
parent
9d354c837e
commit
0a921179df
@ -3,6 +3,9 @@ name: default
|
||||
steps:
|
||||
- name: compile-chrome
|
||||
image: roypur/chrome-packer:latest
|
||||
environment:
|
||||
CHROME_PRIVKEY:
|
||||
from_secret: chrome_privkey
|
||||
commands:
|
||||
- ./pack-chrome.sh
|
||||
- name: gitea_release
|
||||
|
@ -5,6 +5,13 @@ temp_dir="/tmp/${temp_name}"
|
||||
chrome_dir="${temp_dir}/chrome"
|
||||
mkdir -p "${chrome_dir}"
|
||||
|
||||
if [[ "${CHROME_PRIVKEY}test" == "test" ]]
|
||||
then
|
||||
cp "${HOME}/keys/chrome-privkey.pem" "${temp_dir}/privkey.pem"
|
||||
else
|
||||
echo "${CHROME_PRIVKEY}" > "${temp_dir}/privkey.pem"
|
||||
fi
|
||||
|
||||
if [[ "${DBUS_SESSION_BUS_ADDRESS}test" == "test" ]]
|
||||
then
|
||||
export DBUS_SYSTEM_BUS_ADDRESS="unix:path=${temp_dir}/dbus-system.sock"
|
||||
@ -27,6 +34,6 @@ then
|
||||
browser=$(which chromium 2> /dev/null)
|
||||
fi
|
||||
|
||||
${browser} --disable-gpu --no-sandbox --user-data-dir=${chrome_dir} --pack-extension="${dir}/chrome" --pack-extension-key=${HOME}/keys/privkey.pem
|
||||
${browser} --disable-gpu --no-sandbox --user-data-dir=${chrome_dir} --pack-extension="${dir}/chrome" --pack-extension-key="${temp_dir}/privkey.pem"
|
||||
|
||||
rm -rf ${temp_dir}
|
||||
|
Loading…
Reference in New Issue
Block a user