ajustes novos
This commit is contained in:
parent
45d0cc595a
commit
a778c3216f
1 changed files with 6 additions and 7 deletions
|
|
@ -13,7 +13,6 @@ env:
|
|||
|
||||
jobs:
|
||||
build-and-push:
|
||||
# AJUSTE: Labels compatíveis com o runner ID 42 (Idle)
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- ubuntu-latest
|
||||
|
|
@ -22,8 +21,10 @@ jobs:
|
|||
shell: sh
|
||||
|
||||
steps:
|
||||
# SUBSTITUÍDO: checkout@v4 por Git manual para evitar erro de falta de Node.js
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
run: |
|
||||
git clone --depth 1 --branch dev https://${{ secrets.FORGEJO_TOKEN }}@pipe.gohorsejobs.com/${{ github.repository }}.git .
|
||||
|
||||
- name: Check Docker availability
|
||||
run: docker version
|
||||
|
|
@ -55,7 +56,6 @@ jobs:
|
|||
|
||||
deploy-to-k3s:
|
||||
needs: build-and-push
|
||||
# AJUSTE: Labels compatíveis aqui também
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- ubuntu-latest
|
||||
|
|
@ -64,8 +64,10 @@ jobs:
|
|||
shell: sh
|
||||
|
||||
steps:
|
||||
# SUBSTITUÍDO: checkout@v4 por Git manual
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
run: |
|
||||
git clone --depth 1 --branch dev https://${{ secrets.FORGEJO_TOKEN }}@pipe.gohorsejobs.com/${{ github.repository }}.git .
|
||||
|
||||
- name: Install kubectl
|
||||
run: |
|
||||
|
|
@ -81,10 +83,8 @@ jobs:
|
|||
chmod 600 $HOME/.kube/config
|
||||
export KUBECONFIG=$HOME/.kube/config
|
||||
|
||||
# Criar namespace se não existir
|
||||
kubectl create namespace gohorsejobsdev --dry-run=client -o yaml | kubectl apply -f -
|
||||
|
||||
# Atualizar Secrets
|
||||
kubectl -n gohorsejobsdev create secret docker-registry forgejo-registry \
|
||||
--docker-server=${{ env.REGISTRY }} \
|
||||
--docker-username=${{ env.IMAGE_NAMESPACE }} \
|
||||
|
|
@ -98,7 +98,6 @@ jobs:
|
|||
--from-literal=DATABASE_URL="${{ vars.DATABASE_URL }}" \
|
||||
--dry-run=client -o yaml | kubectl apply -f -
|
||||
|
||||
# Aplicar manifestos e atualizar imagens
|
||||
kubectl apply -f k8s/dev/ -n gohorsejobsdev
|
||||
|
||||
kubectl -n gohorsejobsdev set image deployment/gohorse-backend-dev \
|
||||
|
|
|
|||
Loading…
Reference in a new issue