-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (29 loc) · 1.21 KB
/
docker_push.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
name: Build and Push Docker Images to GitHub Registry
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Login to GitHub Docker Registry
run: echo "${{secrets.DOCKER_LOGIN_TOKEN}}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build and push Worker Docker image
run: |
docker build --network=host -t ghcr.io/spin-vt/worker:latest ./back-end -f ./back-end/Dockerfile.worker
docker push ghcr.io/spin-vt/worker:latest
- name: Build and push Backend Docker image
run: |
docker build --network=host -t ghcr.io/spin-vt/backend:latest ./back-end -f ./back-end/Dockerfile.backend
docker push ghcr.io/spin-vt/backend:latest
- name: Build and push Frontend Docker image
run: |
docker build --network=host -t ghcr.io/spin-vt/frontend:latest ./front-end
docker push ghcr.io/spin-vt/frontend:latest
- name: Build and push my-nginx Docker image
run: |
docker build --network=host -f Dockerfile.nginx -t ghcr.io/spin-vt/my-nginx:latest .
docker push ghcr.io/spin-vt/my-nginx:latest