-
Notifications
You must be signed in to change notification settings - Fork 191
58 lines (55 loc) · 1.99 KB
/
update-node-version.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Update Node version
on:
workflow_dispatch:
schedule:
- cron: '15 12 * * *' # At 12:15 PM UTC every day
permissions:
contents: write
pull-requests: write
jobs:
create-pr:
name: Create PR
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: extensions/ql-vscode/.nvmrc
cache: 'npm'
cache-dependency-path: extensions/ql-vscode/package-lock.json
- name: Install dependencies
working-directory: extensions/ql-vscode
run: |
npm ci
shell: bash
- name: Get current Node version
working-directory: extensions/ql-vscode
id: get-current-node-version
run: |
echo "version=$(cat .nvmrc)" >> $GITHUB_OUTPUT
shell: bash
- name: Update Node version
working-directory: extensions/ql-vscode
run: |
npx ts-node scripts/update-node-version.ts
shell: bash
- name: Get current Node version
working-directory: extensions/ql-vscode
id: get-new-node-version
run: |
echo "version=$(cat .nvmrc)" >> $GITHUB_OUTPUT
shell: bash
- name: Commit, Push and Open a PR
uses: ./.github/actions/create-pr
with:
token: ${{ secrets.GITHUB_TOKEN }}
base-branch: main
head-branch: github-action/bump-node-version
commit-message: Bump Node version to ${{ steps.get-new-node-version.outputs.version }}
title: Bump Node version to ${{ steps.get-new-node-version.outputs.version }}
body: >
The Node version used in the latest version of VS Code has been updated. This PR updates the Node version
used for integration tests to match.
The previous Node version was ${{ steps.get-current-node-version.outputs.version }}. This PR updates the
Node version to ${{ steps.get-new-node-version.outputs.version }}.