-
Notifications
You must be signed in to change notification settings - Fork 4
47 lines (44 loc) · 1.65 KB
/
ci.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Build and Push via Master
on:
push:
branches:
- subnet-deployment
jobs:
# backend_test_build_and_push_to_docker_registry: #disable backend in test branch
# name: Test, build and publish backend image to docker hub
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - uses: actions/setup-node@v3
# with:
# node-version: '18.x'
# - name: Install dependencies
# run: cd backend && npm install
# - name: Docker login
# env:
# DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
# DOCKER_PASSWORD: ${{secrets.DOCKER_ACCESS_TOKEN}}
# run: |
# echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# - name: Docker build and tag image
# run: cd backend && docker build . --file Dockerfile --tag xinfinorg/subnet-stats-service:latest
# - name: Docker push
# run: docker push xinfinorg/subnet-stats-service:latest
frontend_test_build_and_push_to_docker_registry:
name: build and publish frontend image to docker hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Docker login
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_PASSWORD: ${{secrets.DOCKER_ACCESS_TOKEN}}
run: |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- name: Docker build and tag image
run: cd backend && docker build . --file Dockerfile --tag xinfinorg/subnet-frontend:latest
- name: Docker push
run: docker push xinfinorg/subnet-frontend:latest