2021-10-20 14:51:32 +00:00
|
|
|
name: Build docker images
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
|
|
build-backend:
|
2021-10-20 19:46:03 +00:00
|
|
|
name: "Build backend image"
|
2021-10-20 14:51:32 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-10-20 19:46:03 +00:00
|
|
|
- name: "Checkout repository"
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: "Login to GitHub Containers"
|
|
|
|
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u Steffo99 --password-stdin
|
|
|
|
- name: "Build the docker container `ghcr.io/steffo99/sophon-backend:latest`"
|
|
|
|
run: docker build ./backend --tag ghcr.io/steffo99/sophon-backend:latest
|
|
|
|
- name: "Upload the container to GitHub Containers"
|
|
|
|
run: docker push ghcr.io/steffo99/sophon-backend:latest
|
2021-10-20 14:51:32 +00:00
|
|
|
build-frontend:
|
2021-10-20 19:46:03 +00:00
|
|
|
name: "Build frontend image"
|
2021-10-20 14:51:32 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-10-20 19:46:03 +00:00
|
|
|
- name: "Checkout repository"
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: "Login to GitHub Containers"
|
|
|
|
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u Steffo99 --password-stdin
|
|
|
|
- name: "Build the docker container `ghcr.io/steffo99/sophon-frontend:latest`"
|
|
|
|
run: docker build ./frontend --tag ghcr.io/steffo99/sophon-frontend:latest
|
|
|
|
- name: "Upload the container to GitHub Containers"
|
|
|
|
run: docker push ghcr.io/steffo99/sophon-frontend:latest
|
2021-10-20 14:51:32 +00:00
|
|
|
build-proxy:
|
2021-10-20 19:46:03 +00:00
|
|
|
name: "Build proxy image"
|
2021-10-20 14:51:32 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-10-20 19:46:03 +00:00
|
|
|
- name: "Checkout repository"
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: "Login to GitHub Containers"
|
|
|
|
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u Steffo99 --password-stdin
|
|
|
|
- name: "Build the docker container `ghcr.io/steffo99/sophon-proxy:latest`"
|
|
|
|
run: docker build ./proxy --tag ghcr.io/steffo99/sophon-proxy:latest
|
|
|
|
- name: "Upload the container to GitHub Containers"
|
|
|
|
run: docker push ghcr.io/steffo99/sophon-proxy:latest
|