File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+
You can’t perform that action at this time.
0 commit comments