Update .forgejo/workflows/deploy.yaml
This commit is contained in:
parent
060b488212
commit
102a198818
1 changed files with 10 additions and 13 deletions
|
|
@ -26,18 +26,19 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
|
# SOLUÇÃO DEFINITIVA: Usa a Action oficial para configurar o Buildx
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
run: |
|
uses: docker/setup-buildx-action@v3
|
||||||
# Limpa builders antigos e força a criação de um novo para evitar cache de credenciais
|
with:
|
||||||
docker buildx rm local-builder || true
|
driver: docker-container
|
||||||
docker buildx create --name local-builder --driver docker-container --use
|
|
||||||
docker buildx inspect --bootstrap
|
|
||||||
|
|
||||||
|
# SOLUÇÃO DEFINITIVA: A login-action injeta o token direto no Buildx
|
||||||
- name: Login to Forgejo Registry
|
- name: Login to Forgejo Registry
|
||||||
run: |
|
uses: docker/login-action@v3
|
||||||
# Limpa logins antigos antes de entrar com o novo token
|
with:
|
||||||
docker logout ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
echo "${{ secrets.FORGEJO_TOKEN }}" | docker login ${{ env.REGISTRY }} -u bohessefm --password-stdin
|
username: bohessefm
|
||||||
|
password: ${{ secrets.FORGEJO_TOKEN }}
|
||||||
|
|
||||||
- name: Build and Push Backend
|
- name: Build and Push Backend
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
|
|
@ -45,11 +46,8 @@ jobs:
|
||||||
context: ./backend
|
context: ./backend
|
||||||
file: ./backend/Dockerfile
|
file: ./backend/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
builder: local-builder
|
|
||||||
provenance: false
|
provenance: false
|
||||||
sbom: 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: |
|
tags: |
|
||||||
${{ env.REGISTRY }}/bohessefm/gohorsejobs:latest
|
${{ env.REGISTRY }}/bohessefm/gohorsejobs:latest
|
||||||
${{ env.REGISTRY }}/bohessefm/gohorsejobs:${{ github.sha }}
|
${{ env.REGISTRY }}/bohessefm/gohorsejobs:${{ github.sha }}
|
||||||
|
|
@ -60,7 +58,6 @@ jobs:
|
||||||
context: ./backoffice
|
context: ./backoffice
|
||||||
file: ./backoffice/Dockerfile
|
file: ./backoffice/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
builder: local-builder
|
|
||||||
provenance: false
|
provenance: false
|
||||||
sbom: false
|
sbom: false
|
||||||
tags: |
|
tags: |
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue