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:
|
build-and-deploy:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code (Nativo)
|
||||||
uses: actions/checkout@v4
|
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
|
- name: Build and Push
|
||||||
run: |
|
run: |
|
||||||
# Importante: diz ao podman para usar o socket do Zeus
|
|
||||||
export DOCKER_HOST=unix:///run/podman/podman.sock
|
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
|
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 build -t git.saveinmed.com.br/${{ github.repository }}:latest ./backend
|
||||||
podman push git.saveinmed.com.br/${{ github.repository }}:latest
|
podman push git.saveinmed.com.br/${{ github.repository }}:latest
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
run: |
|
run: |
|
||||||
# O kubectl no modo host usará o config do root no Zeus
|
|
||||||
kubectl apply -f k8s/
|
kubectl apply -f k8s/
|
||||||
kubectl rollout restart deployment/photum-backend -n photum
|
kubectl rollout restart deployment/photum-backend -n photum
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue