This repository has been archived on 2025-08-08. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
lucida-queue/.forgejo/workflows/release.yaml

73 lines
2 KiB
YAML

name: Build and push Docker image to Container Registry
on:
push:
branches:
- main
tags:
- '*'
jobs:
build-and-push:
name: Build and push Docker image to Container Registry
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
env:
DOCKER_LATEST: latest
RUNNER_TOOL_CACHE: /toolcache
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Container Registry
uses: docker/login-action@v2
with:
registry: git.depeuter.dev
username: ${{ github.actor }}
password: ${{ secrets.CI_TOKEN }}
- name: Get Meta for frontend
id: meta_frontend
uses: docker/metadata-action@v5
with:
images: git.depeuter.dev/${{ github.repository }}/frontend
- name: Build and push frontend
id: docker_build_frontend
uses: docker/build-push-action@v4
with:
context: ./frontend
file: ./frontend/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Get Meta for backend
id: meta_backend
uses: docker/metadata-action@v5
with:
images: git.depeuter.dev/${{ github.repository }}/backend
- name: Build and push backend
id: docker_build_backend
uses: docker/build-push-action@v4
with:
context: ./backend
file: ./backend/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Frontend image digest
run: echo ${{ steps.docker_build_frontend.outputs.digest }}
- name: Backend image digest
run: echo ${{ steps.docker_build_backend.outputs.digest }}