Skip to content

Commit 24d4b2c

Browse files
fix: critical workflow fixes and add missing nginx.conf
- Add missing nginx.conf file (required by Dockerfile) - Fix Node.js version from 22 to 20 (stable LTS) in all workflows - Fix AI code review to work with private repos - Add pull-requests: write permission to performance workflow - Remove unnecessary public repo checks Fixes: - Docker build failure (missing nginx.conf) - Performance workflow PR comment permission error - AI review workflow conditions for private repos
1 parent 7f1c569 commit 24d4b2c

7 files changed

Lines changed: 67 additions & 12 deletions

File tree

.github/workflows/ai-code-review.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ jobs:
2020
ai-review:
2121
name: AI-Powered Code Review
2222
runs-on: ubuntu-latest
23-
if: |
24-
(github.event_name == 'pull_request' || github.event_name == 'pull_request_review_comment') &&
25-
github.event.repository.private == false
23+
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_review_comment'
2624

2725
steps:
2826
- name: Check for OpenAI API Key
@@ -78,9 +76,7 @@ jobs:
7876
coderabbit-review:
7977
name: CodeRabbit AI Review
8078
runs-on: ubuntu-latest
81-
if: |
82-
github.event_name == 'pull_request' &&
83-
github.event.repository.private == false
79+
if: github.event_name == 'pull_request'
8480

8581
steps:
8682
- name: Check for OpenAI API Key

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup Node.js
2525
uses: actions/setup-node@v4
2626
with:
27-
node-version: "22"
27+
node-version: "20"
2828
cache: "npm"
2929

3030
- name: Install dependencies

.github/workflows/performance.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ jobs:
1111
lighthouse:
1212
name: Lighthouse Performance Audit
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
pull-requests: write
1417

1518
steps:
1619
- name: Checkout code
@@ -19,7 +22,7 @@ jobs:
1922
- name: Setup Node.js
2023
uses: actions/setup-node@v4
2124
with:
22-
node-version: "22"
25+
node-version: "20"
2326
cache: "npm"
2427

2528
- name: Install dependencies
@@ -119,7 +122,7 @@ jobs:
119122
- name: Setup Node.js
120123
uses: actions/setup-node@v4
121124
with:
122-
node-version: "22"
125+
node-version: "20"
123126
cache: "npm"
124127

125128
- name: Install dependencies

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Setup Node.js
3030
uses: actions/setup-node@v4
3131
with:
32-
node-version: "22"
32+
node-version: "20"
3333
cache: "npm"
3434

3535
- name: Install dependencies

.github/workflows/security.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
if: steps.check_token.outputs.skip == 'false'
107107
uses: actions/setup-node@v4
108108
with:
109-
node-version: "22"
109+
node-version: "20"
110110
cache: "npm"
111111

112112
- name: Install dependencies

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Setup Node.js
2424
uses: actions/setup-node@v4
2525
with:
26-
node-version: "22"
26+
node-version: "20"
2727
cache: "npm"
2828

2929
- name: Install dependencies

nginx.conf

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
worker_processes auto;
2+
error_log /var/log/nginx/error.log warn;
3+
pid /tmp/nginx.pid;
4+
5+
events {
6+
worker_connections 1024;
7+
}
8+
9+
http {
10+
include /etc/nginx/mime.types;
11+
default_type application/octet-stream;
12+
13+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
14+
'$status $body_bytes_sent "$http_referer" '
15+
'"$http_user_agent" "$http_x_forwarded_for"';
16+
17+
access_log /var/log/nginx/access.log main;
18+
19+
sendfile on;
20+
tcp_nopush on;
21+
keepalive_timeout 65;
22+
gzip on;
23+
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
24+
25+
server {
26+
listen 8080;
27+
server_name localhost;
28+
root /usr/share/nginx/html;
29+
index index.html;
30+
31+
# Security headers
32+
add_header X-Frame-Options "SAMEORIGIN" always;
33+
add_header X-Content-Type-Options "nosniff" always;
34+
add_header X-XSS-Protection "1; mode=block" always;
35+
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
36+
37+
# SPA routing - serve index.html for all routes
38+
location / {
39+
try_files $uri $uri/ /index.html;
40+
}
41+
42+
# Cache static assets
43+
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
44+
expires 1y;
45+
add_header Cache-Control "public, immutable";
46+
}
47+
48+
# Health check endpoint
49+
location /health {
50+
access_log off;
51+
return 200 "healthy\n";
52+
add_header Content-Type text/plain;
53+
}
54+
}
55+
}
56+

0 commit comments

Comments
 (0)