File tree 3 files changed +38
-27
lines changed
3 files changed +38
-27
lines changed Original file line number Diff line number Diff line change
1
+ name : Push to Docker Hub
2
+
3
+ on :
4
+ # push:
5
+ # branches: [ main ]
6
+ workflow_dispatch :
7
+ inputs :
8
+ image-tag :
9
+ description : ' Tag to use for the Docker image'
10
+ required : true
11
+
12
+ jobs :
13
+ push :
14
+ runs-on : ubuntu-latest
15
+
16
+ steps :
17
+ - name : Checkout code
18
+ uses : actions/checkout@v2
19
+
20
+ - name : Log in to Docker Hub
21
+ uses : docker/login-action@v1
22
+ with :
23
+ username : ${{ secrets.DOCKER_HUB_USERNAME }}
24
+ password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
25
+
26
+ - name : Build and push Docker image to specific tag ${{ github.event.inputs.image-tag }}
27
+ uses : docker/build-push-action@v2
28
+ with :
29
+ context : .
30
+ push : true
31
+ tags : siddh34/illm-express:${{ github.event.inputs.image-tag }}
32
+
33
+ - name : Build and push Docker image push to latest tag
34
+ uses : docker/build-push-action@v2
35
+ with :
36
+ context : .
37
+ push : true
38
+ tags : siddh34/illm-express
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
# Use the official Node.js image as the base image
2
2
FROM node:20
3
3
4
- # Set the working directory in the container
5
4
WORKDIR /app
6
5
7
- # Copy package.json and package-lock.json
8
6
COPY package*.json ./
9
7
10
- # Install dependencies
11
8
RUN npm install
12
9
13
- # Copy the rest of the application code
14
10
COPY . .
15
11
16
- # Expose the port the app runs on
17
12
EXPOSE 3000
18
13
19
- # Command to run the application
20
14
CMD ["npm", "start"]
You can’t perform that action at this time.
0 commit comments