Files
portfolio-app/.gitea/workflows/deploy.yml
João Loureiro aeedb3f5a0
Some checks failed
Build and Push Docker Images / build-and-push (push) Has been cancelled
fix(deps): update react to 19.2.4 to fix CVE-2025-55182, add docker workflow
2026-02-14 00:21:50 -03:00

56 lines
1.6 KiB
YAML

name: Build and Push Docker Images
on:
push:
branches: [ "main" ]
tags: [ "v*" ]
jobs:
build-and-push:
runs-on: website-deploy-runner
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to Gitea Registry
uses: docker/login-action@v3
with:
registry: gitea.joaoloureiro.dev.br
username: ${{ secrets.GITEA_USER }}
password: ${{ secrets.GITEA_TOKEN }}
- name: Extract metadata (tags, labels) for Backend
id: meta-backend
uses: docker/metadata-action@v5
with:
images: gitea.joaoloureiro.dev.br/joaonloureiro/portfolio-backend
tags: |
type=semver,pattern={{version}}
type=ref,event=branch
type=raw,value=latest,enable={{is_default_branch}}
- name: Extract metadata (tags, labels) for Frontend
id: meta-frontend
uses: docker/metadata-action@v5
with:
images: gitea.joaoloureiro.dev.br/joaonloureiro/portfolio-frontend
tags: |
type=semver,pattern={{version}}
type=ref,event=branch
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Backend
uses: docker/build-push-action@v5
with:
context: ./backend
push: true
tags: ${{ steps.meta-backend.outputs.tags }}
labels: ${{ steps.meta-backend.outputs.labels }}
- name: Build and push Frontend
uses: docker/build-push-action@v5
with:
context: ./frontend
push: true
tags: ${{ steps.meta-frontend.outputs.tags }}
labels: ${{ steps.meta-frontend.outputs.labels }}