code-server-nodejs update/add workflows

This commit is contained in:
aptalca
2023-05-17 12:07:28 -04:00
parent c32be8852d
commit e13e3e8f12
9 changed files with 72 additions and 85 deletions
@@ -1,19 +1,18 @@
#!/usr/bin/with-contenv bash
echo "**** installing nodejs dev environment ****"
if ! dpkg -l | grep gnupg > /dev/null; then
apt-get update && apt-get install -y --no-install-recommends gnupg
fi
source /etc/lsb-release
[[ ! -f "/etc/apt/sources.list.d/nodesource.list" ]] && \
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
echo "deb https://deb.nodesource.com/node_14.x ${DISTRIB_CODENAME} main" \
NODEJS_MOD_VERSION=${NODEJS_MOD_VERSION:-14}
if [[ ! -f "/etc/apt/sources.list.d/nodesource.list" ]]; then
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODEJS_MOD_VERSION}.x ${DISTRIB_CODENAME} main" \
> /etc/apt/sources.list.d/nodesource.list
[[ ! -f "/etc/apt/sources.list.d/yarn.list" ]] && \
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
fi
if [[ ! -f "/etc/apt/sources.list.d/yarn.list" ]]; then
curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarnsource.gpg >/dev/null
echo 'deb [signed-by=/usr/share/keyrings/yarnsource.gpg] https://dl.yarnpkg.com/debian/ stable main' \
> /etc/apt/sources.list.d/yarn.list
fi
echo "**** Adding nodejs and yarn to package install list ****"
echo "\