Files
MOPC-Portal/.gitea/workflows/build.yml
Matt e56e143a40
All checks were successful
Build and Push Docker Image / build (push) Successful in 10m35s
Update CI workflow to use new Gitea registry at code.monaco-opc.com
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 14:00:50 +01:00

40 lines
1.0 KiB
YAML

name: Build and Push Docker Image
on:
push:
branches:
- main
env:
REGISTRY: code.monaco-opc.com
IMAGE_NAME: mopc/mopc-portal
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: matt
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max