connect to the api #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build, Test and Push | |
on: | |
push: | |
branches: | |
- "**" | |
pull_request: | |
branches: | |
- "**" | |
env: | |
IMAGE_NAME: messaging_app | |
# REPO_NAME: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- run: npm install | |
- run: npm run lint | |
- run: npm run test | |
- name: Build docker image | |
run: | | |
docker build . -t $IMAGE_NAME | |
- name: Run docker container | |
run: | | |
docker run -d -e 5173:5173 -host=172.17.0.2 $IMAGE_NAME:latest && \ | |
docker ps && sleep 5 |