chore: test deploy with host runner
This commit is contained in:
parent
d8643e47fe
commit
003d4f2d49
1 changed files with 7 additions and 6 deletions
|
|
@ -8,23 +8,24 @@ jobs:
|
|||
build-and-deploy:
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
- name: Checkout Code (Nativo)
|
||||
run: |
|
||||
# Limpa a pasta e clona o código sem precisar de Node.js
|
||||
rm -rf *
|
||||
git clone -b dev https://${{ github.actor }}:${{ secrets.FORGEJO_TOKEN }}@git.saveinmed.com.br/${{ github.repository }}.git .
|
||||
|
||||
- name: Build and Push
|
||||
run: |
|
||||
# Importante: diz ao podman para usar o socket do Zeus
|
||||
export DOCKER_HOST=unix:///run/podman/podman.sock
|
||||
|
||||
# Login no seu registro (garantindo que o Runner tem permissão)
|
||||
# Login no registro
|
||||
echo "${{ secrets.FORGEJO_TOKEN }}" | podman login git.saveinmed.com.br -u ${{ github.actor }} --password-stdin
|
||||
|
||||
# Build e Push usando os binários locais do Zeus
|
||||
# Build e Push
|
||||
podman build -t git.saveinmed.com.br/${{ github.repository }}:latest ./backend
|
||||
podman push git.saveinmed.com.br/${{ github.repository }}:latest
|
||||
|
||||
- name: Deploy
|
||||
run: |
|
||||
# O kubectl no modo host usará o config do root no Zeus
|
||||
kubectl apply -f k8s/
|
||||
kubectl rollout restart deployment/photum-backend -n photum
|
||||
|
|
|
|||
Loading…
Reference in a new issue