Skip to content

Commit 707dbf7

Browse files
hello_node_ci.yml
1 parent ac85e41 commit 707dbf7

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Second CI
2+
3+
on:
4+
push:
5+
# path: ""
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-test:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout Code
14+
uses: actions/checkout@v6
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v6
18+
with:
19+
node-version: '25'
20+
21+
- name: Install Dependencies
22+
working-directory: docker/app1-hello/node
23+
run: npm ci
24+
25+
- name: Run Tests (If any)
26+
working-directory: docker/app1-hello/node
27+
run: npm test --if-present
28+
29+
docker-build-push:
30+
runs-on: ubuntu-latest
31+
needs: build-test
32+
33+
steps:
34+
- name: Checkout Code
35+
uses: actions/checkout@v6
36+
37+
- name: Login to Docker Hub
38+
uses: docker/login-action@v3
39+
with:
40+
username: ${{ secrets.DOCKER_USERNAME }}
41+
password: ${{ secrets.DOCKER_PASSWORD }}
42+
43+
- name: Build and Push Docker Image
44+
uses: docker/build-push-action@v6
45+
with:
46+
context: docker/app1-hello/node
47+
push: true
48+
tags: |
49+
${{ secrets.DOCKER_USERNAME }}/hello-node:latest
50+

0 commit comments

Comments
 (0)