Skip to content

Commit ced72b3

Browse files
author
amrutha
committed
.\.git\workflows
1 parent 2c777bc commit ced72b3

File tree

1 file changed

+29
-16
lines changed

1 file changed

+29
-16
lines changed

.github/workflows/ci.yml

+29-16
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,31 @@
11
name: Converter CI
2-
on:
3-
push:
4-
branches: [ "main" ]
5-
jobs:
6-
build:
2+
on: push:
3+
branches: [ "main" ]
4+
jobs: build:
75
runs-on: ubuntu-latest
8-
steps:
9-
- name: Checkout repository
10-
uses: actions/checkout@v4
11-
- name: Setup Node.js
12-
uses: actions/setup-node@v4
13-
with:
14-
node-version: 18 # Use the Node.js version of your choice
15-
- name: Install dependencies
16-
run: npm install
17-
- name: Run Jest tests
18-
run: npm test
6+
steps:
7+
- name: Checkout repository
8+
uses: actions/checkout@v4
9+
- name: Setup Node.js
10+
uses: actions/setup-node@v4
11+
with:
12+
node-version: 18
13+
- name: Install dependencies
14+
run: npm install
15+
- name: Run Jest tests
16+
run: npm test
17+
docker:
18+
needs: build
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v3
23+
- name: Log in to Docker Hub
24+
uses: docker/login-action@v3
25+
with:
26+
username: ${{ secrets.DOCKER_USERNAME }}
27+
password: ${{ secrets.DOCKER_PASSWORD }}
28+
- name: Build and push Docker image
29+
run: |
30+
docker build -t glarimy/glarimy-converter:latest .
31+
docker push glarimy/glarimy-converter:latest

0 commit comments

Comments
 (0)