Add docker build to main. (#16)
All checks were successful
Check / Backend (push) Successful in 20m43s
Check / Frontend (push) Successful in 1m54s
Docker Build / Build and Push Backend Image (push) Successful in 12m14s
Docker Build / Build and Push Frontend Image (push) Successful in 5m19s

Reviewed-on: #16
Co-authored-by: Drew Galbraith <drew@tiramisu.one>
Co-committed-by: Drew Galbraith <drew@tiramisu.one>
This commit is contained in:
Drew 2025-10-19 03:27:10 +00:00 committed by Drew
parent ff6837a751
commit 25eb4af14d
10 changed files with 205 additions and 24 deletions

View file

@ -0,0 +1,46 @@
name: Docker Build
on:
push:
branches: [ main ]
jobs:
docker-backend:
name: Build and Push Backend Image
runs-on: docker
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- run: |
apt update && apt install -y docker.io
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Forgejo Container Registry
run: echo "${{ secrets.FORGEJO_TOKEN }}" | docker login ${{ forgejo.server_url }} -u ${{ forgejo.actor }} --password-stdin
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: ./backend
push: true
tags: git.tiramisu.one/drew/captains-log-backend
docker-frontend:
name: Build and Push Frontend Image
runs-on: docker
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- run: |
apt update && apt install -y docker.io
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Forgejo Container Registry
run: echo "${{ secrets.FORGEJO_TOKEN }}" | docker login ${{ forgejo.server_url }} -u ${{ forgejo.actor }} --password-stdin
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: ./frontend
push: true
tags: git.tiramisu.one/drew/captains-log-frontend