diff --git a/.gitea/workflows/update_readme.yml b/.gitea/workflows/update_readme.yml index 265d728..57c2296 100644 --- a/.gitea/workflows/update_readme.yml +++ b/.gitea/workflows/update_readme.yml @@ -25,9 +25,14 @@ jobs: - name: Install Fetch run: | echo "Installing fetch" - apt-get install -y curl - curl -fsSL https://deb.nodesource.com/setup_24.x | bash - npm install node-fetch + if ! command -v node &> /dev/null; then + apt-get install -y curl + curl -fsSL https://deb.nodesource.com/setup_24.x | bash + fi + package='node-fetch' + if [ `npm list -g | grep -c $package` -eq 0 ]; then + npm install $package --no-shrinkwrap + fi - name: Login to DockerHub container registry uses: https://github.com/docker/login-action@v3 with: