mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
move inline to envvariables.sh
This commit is contained in:
7
images/linux/scripts/installers/envvariables.sh
Normal file
7
images/linux/scripts/installers/envvariables.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#Set ImageVersion and ImageOS env variables
|
||||||
|
"echo ImageVersion=$IMAGE_VERSION | tee -a /etc/environment",
|
||||||
|
"echo ImageOS=$IMAGE_OS | tee -a /etc/environment"
|
||||||
|
|
||||||
|
# This directory is supposed to be created in $HOME and owned by user(https://github.com/actions/virtual-environments/issues/491)
|
||||||
|
mkdir -p /etc/skel/.config/configstore
|
||||||
|
echo 'export XDG_CONFIG_HOME=$HOME/.config' | tee -a /etc/skel/.bashrc
|
||||||
@@ -123,18 +123,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"inline": [
|
"scripts": [
|
||||||
"echo ImageVersion={{user `image_version`}} | tee -a /etc/environment",
|
"{{template_dir}}/scripts/installers/envvariables.sh"
|
||||||
"echo ImageOS={{user `image_os`}} | tee -a /etc/environment"
|
|
||||||
],
|
],
|
||||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
"environment_vars": [
|
||||||
},
|
"IMAGE_VERSION={{user `image_version`}}",
|
||||||
{
|
"IMAGE_OS={{user `image_os`}}"
|
||||||
"type": "shell",
|
|
||||||
"inline": [
|
|
||||||
"# This directory is supposed to be created in $HOME and owned by user(https://github.com/actions/virtual-environments/issues/491)",
|
|
||||||
"mkdir -p /etc/skel/.config/configstore",
|
|
||||||
"echo 'export XDG_CONFIG_HOME=$HOME/.config' | tee -a /etc/skel/.bashrc"
|
|
||||||
],
|
],
|
||||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -126,18 +126,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"inline": [
|
"scripts": [
|
||||||
"echo ImageVersion={{user `image_version`}} | tee -a /etc/environment",
|
"{{template_dir}}/scripts/installers/envvariables.sh"
|
||||||
"echo ImageOS={{user `image_os`}} | tee -a /etc/environment"
|
|
||||||
],
|
],
|
||||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
"environment_vars": [
|
||||||
},
|
"IMAGE_VERSION={{user `image_version`}}",
|
||||||
{
|
"IMAGE_OS={{user `image_os`}}"
|
||||||
"type": "shell",
|
|
||||||
"inline": [
|
|
||||||
"# This directory is supposed to be created in $HOME and owned by user(https://github.com/actions/virtual-environments/issues/491)",
|
|
||||||
"mkdir -p /etc/skel/.config/configstore",
|
|
||||||
"echo 'export XDG_CONFIG_HOME=$HOME/.config' | tee -a /etc/skel/.bashrc"
|
|
||||||
],
|
],
|
||||||
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user