Skip to content

Commit 57a204e

Browse files
ninja14696claude
andcommitted
ci: migrate to Node 24 LTS (actions + app) and fix deploy SSH debug
Resolve the 'Node.js 20 actions are deprecated' warnings by bumping every JS action to its Node-24 runtime release: - actions/checkout v4->v5, actions/setup-node v4->v5, actions/cache v4->v5 - docker/build-push-action v5->v7, docker/login-action v3->v4, docker/setup-buildx-action v3->v4, docker/metadata-action v5->v6 - github/codeql-action/* v3->v4 Declare Node 24 in the webapp: add engines.node >=24 and .nvmrc (24), and migrate @tsconfig/node22 -> @tsconfig/node24 (tsconfig.node.json extends). Also fix the deploy.yml SSH debug line: ${#{{ secrets.SERVER_SSH_KEY }}} expanded the secret inline and produced a bash 'bad substitution' error in the failure branch; pass the secret via a step env var and use ${#SSH_KEY}. Verified locally on node 24.16.0: install clean, @tsconfig/node24 24.0.4, type-check and 170 webapp unit tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
1 parent e01fff4 commit 57a204e

10 files changed

Lines changed: 45 additions & 39 deletions

File tree

.github/workflows/build.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,28 @@ jobs:
2626

2727
steps:
2828
- name: Checkout code
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@v5
3030

3131
- name: Log in to Docker Hub
32-
uses: docker/login-action@v3
32+
uses: docker/login-action@v4
3333
with:
3434
username: ${{ secrets.DOCKER_HUB_USERNAME }}
3535
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
3636
continue-on-error: true
3737

3838
- name: Set up Docker Buildx
39-
uses: docker/setup-buildx-action@v3
39+
uses: docker/setup-buildx-action@v4
4040

4141
- name: Log in to GHCR
42-
uses: docker/login-action@v3
42+
uses: docker/login-action@v4
4343
with:
4444
registry: ghcr.io
4545
username: ${{ github.repository_owner }}
4646
password: ${{ secrets.GITHUB_TOKEN }}
4747

4848
- name: Extract metadata
4949
id: meta
50-
uses: docker/metadata-action@v5
50+
uses: docker/metadata-action@v6
5151
with:
5252
images: ghcr.io/${{ github.repository_owner }}/livrolog-api
5353
tags: |
@@ -58,7 +58,7 @@ jobs:
5858
type=raw,value=prod,enable=${{ github.ref == 'refs/heads/main' }}
5959
6060
- name: Build and push API image
61-
uses: docker/build-push-action@v5
61+
uses: docker/build-push-action@v7
6262
with:
6363
context: .
6464
file: ./api/Dockerfile.prod
@@ -76,28 +76,28 @@ jobs:
7676

7777
steps:
7878
- name: Checkout code
79-
uses: actions/checkout@v4
79+
uses: actions/checkout@v5
8080

8181
- name: Log in to Docker Hub
82-
uses: docker/login-action@v3
82+
uses: docker/login-action@v4
8383
with:
8484
username: ${{ secrets.DOCKER_HUB_USERNAME }}
8585
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
8686
continue-on-error: true
8787

8888
- name: Set up Docker Buildx
89-
uses: docker/setup-buildx-action@v3
89+
uses: docker/setup-buildx-action@v4
9090

9191
- name: Log in to GHCR
92-
uses: docker/login-action@v3
92+
uses: docker/login-action@v4
9393
with:
9494
registry: ghcr.io
9595
username: ${{ github.repository_owner }}
9696
password: ${{ secrets.GITHUB_TOKEN }}
9797

9898
- name: Extract metadata
9999
id: meta
100-
uses: docker/metadata-action@v5
100+
uses: docker/metadata-action@v6
101101
with:
102102
images: ghcr.io/${{ github.repository_owner }}/livrolog-web
103103
tags: |
@@ -108,7 +108,7 @@ jobs:
108108
type=raw,value=prod,enable=${{ github.ref == 'refs/heads/main' }}
109109
110110
- name: Build and push Web image
111-
uses: docker/build-push-action@v5
111+
uses: docker/build-push-action@v7
112112
with:
113113
context: .
114114
file: ./webapp/Dockerfile.prod

.github/workflows/code-quality.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: Checkout code
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
2222

2323
- name: Set up PHP
2424
uses: shivammathur/setup-php@v2
@@ -28,7 +28,7 @@ jobs:
2828
tools: composer:v2
2929

3030
- name: Cache composer dependencies
31-
uses: actions/cache@v4
31+
uses: actions/cache@v5
3232
with:
3333
path: |
3434
api/vendor
@@ -63,7 +63,7 @@ jobs:
6363
fi
6464
6565
- name: Set up Node.js
66-
uses: actions/setup-node@v4
66+
uses: actions/setup-node@v5
6767
with:
6868
node-version: '24'
6969
cache: 'yarn'
@@ -103,7 +103,7 @@ jobs:
103103

104104
steps:
105105
- name: Checkout code
106-
uses: actions/checkout@v4
106+
uses: actions/checkout@v5
107107

108108
- name: Set up PHP
109109
uses: shivammathur/setup-php@v2
@@ -145,10 +145,10 @@ jobs:
145145

146146
steps:
147147
- name: Checkout code
148-
uses: actions/checkout@v4
148+
uses: actions/checkout@v5
149149

150150
- name: Set up Node.js
151-
uses: actions/setup-node@v4
151+
uses: actions/setup-node@v5
152152
with:
153153
node-version: '24'
154154
cache: 'yarn'

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ jobs:
3131

3232
steps:
3333
- name: Checkout repository
34-
uses: actions/checkout@v4
34+
uses: actions/checkout@v5
3535

3636
- name: Initialize CodeQL
37-
uses: github/codeql-action/init@v3
37+
uses: github/codeql-action/init@v4
3838
with:
3939
languages: ${{ matrix.language }}
4040
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -43,9 +43,9 @@ jobs:
4343
# queries: security-extended,security-and-quality
4444

4545
- name: Autobuild
46-
uses: github/codeql-action/autobuild@v3
46+
uses: github/codeql-action/autobuild@v4
4747

4848
- name: Perform CodeQL Analysis
49-
uses: github/codeql-action/analyze@v3
49+
uses: github/codeql-action/analyze@v4
5050
with:
5151
category: '/language:${{matrix.language}}'

.github/workflows/deploy.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484

8585
steps:
8686
- name: Checkout code for compose file
87-
uses: actions/checkout@v4
87+
uses: actions/checkout@v5
8888
with:
8989
token: ${{ secrets.GITHUB_TOKEN }}
9090

@@ -123,6 +123,8 @@ jobs:
123123
echo "✅ Secret validation completed"
124124
125125
- name: Setup SSH key and test connection
126+
env:
127+
SSH_KEY: ${{ secrets.SERVER_SSH_KEY }}
126128
run: |
127129
echo "🔐 Setting up SSH connection..."
128130
@@ -153,7 +155,7 @@ jobs:
153155
echo "Debug information:"
154156
echo " Host: ${{ secrets.SERVER_HOST }}"
155157
echo " User: ${{ secrets.SERVER_USER }}"
156-
echo " Key length: ${#{{ secrets.SERVER_SSH_KEY }}}"
158+
echo " Key length: ${#SSH_KEY}"
157159
exit 1
158160
fi
159161

.github/workflows/required-checks.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
steps:
1919
- name: Checkout code
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@v5
2121

2222
- name: Set up PHP
2323
uses: shivammathur/setup-php@v2
@@ -27,7 +27,7 @@ jobs:
2727
tools: composer:v2
2828

2929
- name: Set up Node.js
30-
uses: actions/setup-node@v4
30+
uses: actions/setup-node@v5
3131
with:
3232
node-version: '24'
3333
cache: 'yarn'
@@ -93,7 +93,7 @@ jobs:
9393

9494
steps:
9595
- name: Checkout code
96-
uses: actions/checkout@v4
96+
uses: actions/checkout@v5
9797

9898
- name: Set up PHP
9999
uses: shivammathur/setup-php@v2
@@ -103,7 +103,7 @@ jobs:
103103
tools: composer:v2
104104

105105
- name: Cache composer dependencies
106-
uses: actions/cache@v4
106+
uses: actions/cache@v5
107107
with:
108108
path: |
109109
api/vendor
@@ -153,10 +153,10 @@ jobs:
153153

154154
steps:
155155
- name: Checkout code
156-
uses: actions/checkout@v4
156+
uses: actions/checkout@v5
157157

158158
- name: Set up Node.js
159-
uses: actions/setup-node@v4
159+
uses: actions/setup-node@v5
160160
with:
161161
node-version: '24'
162162
cache: 'yarn'

.github/workflows/weekly-maintenance.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@v5
2020

2121
- name: Set up PHP
2222
uses: shivammathur/setup-php@v2
@@ -25,7 +25,7 @@ jobs:
2525
tools: composer:v2
2626

2727
- name: Set up Node.js
28-
uses: actions/setup-node@v4
28+
uses: actions/setup-node@v5
2929
with:
3030
node-version: '24'
3131
cache: 'yarn'
@@ -67,7 +67,7 @@ jobs:
6767

6868
steps:
6969
- name: Checkout code
70-
uses: actions/checkout@v4
70+
uses: actions/checkout@v5
7171

7272
- name: Build and measure performance
7373
run: |

webapp/.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24

webapp/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"author": "Arnon Rodrigues <[email protected]> (https://arnon.dev)",
44
"description": "A place for you to organize everything you've read.",
55
"private": true,
6+
"engines": {
7+
"node": ">=24"
8+
},
69
"scripts": {
710
"dev": "vite",
811
"build": "run-p type-check \"build-only {@}\" --",
@@ -55,7 +58,7 @@
5558
"@pinia/testing": "^0.1.7",
5659
"@playwright/test": "^1.58.2",
5760
"@quasar/vite-plugin": "^1.10.0",
58-
"@tsconfig/node22": "^22.0.5",
61+
"@tsconfig/node24": "^24.0.0",
5962
"@types/dompurify": "^3.2.0",
6063
"@types/node": "^24.3.0",
6164
"@vitejs/plugin-vue": "^6.0.4",

webapp/tsconfig.node.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "@tsconfig/node22/tsconfig.json",
2+
"extends": "@tsconfig/node24/tsconfig.json",
33
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "nightwatch.conf.*", "playwright.config.*", "eslint.config.*"],
44
"compilerOptions": {
55
"noEmit": true,

webapp/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,10 +1714,10 @@
17141714
magic-string "^0.30.21"
17151715
string.prototype.matchall "^4.0.12"
17161716

1717-
"@tsconfig/node22@^22.0.5":
1718-
version "22.0.5"
1719-
resolved "https://registry.yarnpkg.com/@tsconfig/node22/-/node22-22.0.5.tgz#56be9f34ccffd3aa85f9cc7365ad9765d5829adb"
1720-
integrity sha512-hLf2ld+sYN/BtOJjHUWOk568dvjFQkHnLNa6zce25GIH+vxKfvTgm3qpaH6ToF5tu/NN0IH66s+Bb5wElHrLcw==
1717+
"@tsconfig/node24@^24.0.0":
1718+
version "24.0.4"
1719+
resolved "https://registry.yarnpkg.com/@tsconfig/node24/-/node24-24.0.4.tgz#ae50cc6b3288c1010454f0ec4659b47b520ca1b1"
1720+
integrity sha512-2A933l5P5oCbv6qSxHs7ckKwobs8BDAe9SJ/Xr2Hy+nDlwmLE1GhFh/g/vXGRZWgxBg9nX/5piDtHR9Dkw/XuA==
17211721

17221722
"@types/chai@^5.2.2":
17231723
version "5.2.3"

0 commit comments

Comments
 (0)