-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (23 loc) · 818 Bytes
/
deploy.yml
File metadata and controls
29 lines (23 loc) · 818 Bytes
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
name: Build new Docker image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
run: echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u "${{ secrets.GHCR_USERNAME }}" --password-stdin
- name: Build and push frontend Docker image
run: |
IMAGE_NAME=ghcr.io/${{ secrets.GHCR_USERNAME }}/lookatme:latest
docker build -t $IMAGE_NAME ./frontend
docker push $IMAGE_NAME
- name: Build and push backend Docker image
run: |
IMAGE_NAME=ghcr.io/${{ secrets.GHCR_USERNAME }}/lookatme-api:latest
docker build -t $IMAGE_NAME ./backend
docker push $IMAGE_NAME