-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (28 loc) · 876 Bytes
/
cicd.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: ecom-deploy
on:
push:
branches:
- main
jobs:
build:
name: install ubuntu
runs-on: ubuntu-latest
steps:
- name: checkout source repo
uses: actions/checkout@v4
- name: login to docker hub
run: docker login -u ${{secrets.DOCKER_USERNAME}} -p ${{secrets.DOCKER_PASS}}
- name: build docker image
run: docker build -t arkostar/shirtup .
- name: publish image to docker
run: docker push arkostar/shirtup:latest
- name: setup Node js
uses: actions/setup-node@v2
deploy:
needs: build
runs-on: self-hosted
steps:
- name: pull image from docker hub
run: docker pull arkostar/shirtup:latest
- name: Run Docker Container
run: docker run -d -p 5000:5000 --name node-js-Ecom-container -e MOGODB_PASS=`${{secrets.MOGODB_PASS}}` arkostar/shirtup