Files
whowhat/.gitea/workflows/build.yml
Kacper 86cd77028c
All checks were successful
Build and Push Docker Images / build-and-push (push) Successful in 1m32s
Use dedicated PAT for registry login in Gitea Actions workflow
The built-in actions token lacks package registry write scope,
causing docker login to fail with "unauthorized". A PAT with
write:package scope must be added as the REGISTRY_TOKEN secret.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-11 20:30:32 +02:00

41 lines
989 B
YAML

name: Build and Push Docker Images
on:
push:
branches:
- main
env:
REGISTRY: gitea.kzbikowski.pl
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ gitea.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push Backend
uses: docker/build-push-action@v5
with:
context: ./backend
push: true
tags: ${{ env.REGISTRY }}/${{ gitea.repository }}/backend:latest
- name: Build and push Frontend
uses: docker/build-push-action@v5
with:
context: ./frontend
push: true
tags: ${{ env.REGISTRY }}/${{ gitea.repository }}/frontend:latest