From a3c0e1022f3b6d95e3dd359c9e0d19966ada6f62 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Sat, 21 Oct 2023 14:06:04 +0530 Subject: [PATCH] use node16 via nvm --- .woodpecker.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 22d23bc..5e09ebe 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,19 +1,18 @@ -pipeline: +steps: build: image: python + environment: + - NVM_DIR="$HOME/.nvm" when: - event: [ push, pull_request, tag, deployment ] + event: [push, pull_request, tag, deployment] branch: master commands: - - apt-get update - - apt-get install -y ca-certificates curl gnupg tar wget - - mkdir -p /etc/apt/keyrings - - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg - - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list - - apt-get -y install nodejs npm - - npm install --global yarn - - apt update && apt-get -y --no-install-recommends install nodejs tar gpg curl wget - - make env - - make - - make ci-deploy - secrets: [ FORGEJO_WRITE_DEPLOY_KEY, LIBREPAGES_DEPLOY_SECRET ] + - apt-get update + - apt update && apt-get -y --no-install-recommends install curl tar gnupg curl wget git + - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash + - source "$NVM_DIR/nvm.sh" && nvm install 16.20.2 + - source "$NVM_DIR/nvm.sh" && nvm use 16.20.2 + - source "$NVM_DIR/nvm.sh" && node install yarn + - source "$NVM_DIR/nvm.sh" && make env + - source "$NVM_DIR/nvm.sh" && make ci-deploy + secrets: [FORGEJO_WRITE_DEPLOY_KEY, LIBREPAGES_DEPLOY_SECRET]