Skip to content

Commit

Permalink
adding ci cd
Browse files Browse the repository at this point in the history
  • Loading branch information
ezequielramos committed Oct 7, 2023
1 parent 589a733 commit 1c6541b
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 2 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: FindFace Multi Mock CI/CD

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v3

- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version-file: .nvmrc

- name: Installing dependencies
run: npm install

- name: Linter Validation
run: npm run eslint

- name: Build
run: npm run build

- name: Run tests
run: npm run devops_coverage

- name: Codecov
uses: codecov/[email protected]

build_push_docker:
needs: test
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
steps:

- uses: actions/checkout@v3

- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version-file: .nvmrc

- name: Installing dependencies
run: npm install

- name: Build
run: npm run build

- name: Build and push Docker images
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: ezequielmr94/findface-multi-mock
tags: latest
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ The implementation is based on [this documentation](https://docs.ntechlab.com/pr
## How to run?

```bash
docker run --rm -d --name ntechlab -p 5000:5000 digitaldivas/findface-multi-mock
docker run --rm -d --name ntechlab -p 5000:5000 ezequielmr94/findface-multi-mock

# or if you want to change the port on the host for 8956 for example
docker run --rm -d --name ntechlab -p 8956:5000 digitaldivas/findface-multi-mock
docker run --rm -d --name ntechlab -p 8956:5000 ezequielmr94/findface-multi-mock
```

## Install
Expand Down

0 comments on commit 1c6541b

Please sign in to comment.