Update .forgejo/workflows/deploy.yaml

This commit is contained in:
bohessefm 2026-01-30 22:58:53 +00:00
parent 060b488212
commit 102a198818

View file

@ -26,18 +26,19 @@ jobs:
with:
fetch-depth: 1
# SOLUÇÃO DEFINITIVA: Usa a Action oficial para configurar o Buildx
- name: Set up Docker Buildx
run: |
# Limpa builders antigos e força a criação de um novo para evitar cache de credenciais
docker buildx rm local-builder || true
docker buildx create --name local-builder --driver docker-container --use
docker buildx inspect --bootstrap
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
# SOLUÇÃO DEFINITIVA: A login-action injeta o token direto no Buildx
- name: Login to Forgejo Registry
run: |
# Limpa logins antigos antes de entrar com o novo token
docker logout ${{ env.REGISTRY }}
echo "${{ secrets.FORGEJO_TOKEN }}" | docker login ${{ env.REGISTRY }} -u bohessefm --password-stdin
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: bohessefm
password: ${{ secrets.FORGEJO_TOKEN }}
- name: Build and Push Backend
uses: docker/build-push-action@v5
@ -45,11 +46,8 @@ jobs:
context: ./backend
file: ./backend/Dockerfile
push: true
builder: local-builder
provenance: false
sbom: false
# Adicionamos o carregamento explícito de imagens locais se necessário
# e garantimos que ele use o builder recém-criado
tags: |
${{ env.REGISTRY }}/bohessefm/gohorsejobs:latest
${{ env.REGISTRY }}/bohessefm/gohorsejobs:${{ github.sha }}
@ -60,7 +58,6 @@ jobs:
context: ./backoffice
file: ./backoffice/Dockerfile
push: true
builder: local-builder
provenance: false
sbom: false
tags: |