Skip to content

Commit 0b36e48

Browse files
committed
github docker publish and update to node 24
1 parent 74ae3a9 commit 0b36e48

2 files changed

Lines changed: 57 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: 24
17+
cache: npm
18+
19+
- run: npm ci
20+
- run: npm test
21+
- run: npm run smoke
22+
23+
publish:
24+
needs: test
25+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
26+
runs-on: ubuntu-latest
27+
permissions:
28+
contents: read
29+
packages: write
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- uses: docker/setup-buildx-action@v3
34+
35+
- uses: docker/login-action@v3
36+
with:
37+
registry: ghcr.io
38+
username: ${{ github.actor }}
39+
password: ${{ secrets.GITHUB_TOKEN }}
40+
41+
- uses: docker/metadata-action@v5
42+
id: meta
43+
with:
44+
images: ghcr.io/${{ github.repository }}
45+
tags: |
46+
type=raw,value=latest
47+
type=sha,format=short
48+
49+
- uses: docker/build-push-action@v6
50+
with:
51+
context: .
52+
push: true
53+
tags: ${{ steps.meta.outputs.tags }}
54+
labels: ${{ steps.meta.outputs.labels }}
55+
cache-from: type=gha
56+
cache-to: type=gha,mode=max

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1
2-
FROM node:20-alpine
2+
FROM node:24-alpine
33
ENV NODE_ENV=production
44
WORKDIR /opt/nginx-ip-gate
55

0 commit comments

Comments
 (0)