ci: configura deploy automatico para k3s

This commit is contained in:
Marcus 2026-01-23 16:46:49 -03:00
parent ecac403cdc
commit d02ba47fe8

View file

@ -30,12 +30,9 @@ jobs:
docker buildx inspect --bootstrap
- name: Login to Forgejo Registry
uses: docker/login-action@v3
with:
registry: pipe.gohorsejobs.com
username: ${{ github.actor }}
# USANDO O TOKEN QUE VOCÊ CADASTROU NO SECRETS
password: ${{ secrets.FORGEJO_TOKEN }}
run: |
# Tentativa manual de login caso a Action falhe no handshake
echo "${{ secrets.FORGEJO_TOKEN }}" | docker login pipe.gohorsejobs.com -u bohessefm --password-stdin
- name: Build and Push Backend
uses: docker/build-push-action@v5
@ -43,7 +40,7 @@ jobs:
context: ./backend
file: ./backend/Dockerfile
push: true
provenance: false # Melhora compatibilidade com Forgejo
provenance: false
tags: |
pipe.gohorsejobs.com/bohessefm/gohorsejobs:latest
pipe.gohorsejobs.com/bohessefm/gohorsejobs:${{ github.sha }}
@ -56,7 +53,7 @@ jobs:
context: ./backoffice
file: ./backoffice/Dockerfile
push: true
provenance: false # Melhora compatibilidade com Forgejo
provenance: false
tags: |
pipe.gohorsejobs.com/bohessefm/backoffice:latest
pipe.gohorsejobs.com/bohessefm/backoffice:${{ github.sha }}
@ -72,7 +69,6 @@ jobs:
steps:
- name: Prepare Deploy
run: |
# Instalando kubectl caso a imagem alpine não tenha
apk add --no-cache git curl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl