Skip to content

Use Node APIs to replace __dirname #1492

Use Node APIs to replace __dirname

Use Node APIs to replace __dirname #1492

Workflow file for this run

name: Renovate
on:
schedule:
- cron: "0 0 * * *"
push:
branches:
main
workflow_dispatch:
env:
POWERSHELL_CLI_TELEMETRY_OPTOUT: "1"
POWERSHELL_TELEMETRY_OPTOUT: "1"
POWERSHELL_UPDATECHECK: "Off"
POWERSHELL_UPDATECHECK_OPTOUT: "1"
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
DOTNET_TELEMETRY_OPTOUT: "1"
COMPlus_EnableDiagnostics: "0"
jobs:
renovate:
runs-on: windows-latest
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
issues: write
checks: write
steps:
- name: Setup Node.js environment
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: "18.x"
- name: Get npm cache directory
id: npm-cache-dir
shell: pwsh
run: |
"dir=$(npm config get cache --global)" >> ${env:GITHUB_OUTPUT}
$cultureInfo = [System.Globalization.CultureInfo]::InvariantCulture
$date = get-date
$weeknumber = $cultureInfo.Calendar.GetWeekOfYear($date,$cultureInfo.DateTimeFormat.CalendarWeekRule,$cultureInfo.DateTimeFormat.FirstDayOfWeek)
"$weeknumber-$($date.Year)" >> renovate-cache-lock.txt
npm show renovate version >> renovate-lock.txt
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: npm-cache-${{ hashFiles('renovate-lock.txt') }}
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: "./.renovateCache"
key: renovate-cache-${{ hashFiles('renovate-cache-lock.txt') }}
- name: Runs renovate against this repository.
run: |
git config --global user.email 'bot@renovateapp.com'
git config --global user.name 'Renovate Bot'
npm install renovate
npm exec -- renovate --platform=github --include-forks=true --enabled-managers="npm,azure-pipelines,github-actions" $env:REPOSITORY
env:
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
REPOSITORY: ${{ github.repository }}
RENOVATE_CACHE_DIR: "./.renovateCache"
LOG_LEVEL: "debug"