fix: use ubuntu runner for deploy (has git)
Some checks failed
books / docker (push) Successful in 8s
books / deploy (push) Failing after 3s

This commit is contained in:
Djohn 2026-02-07 11:05:53 +01:00
parent 6b6e3f0c15
commit 0d353037c2
No known key found for this signature in database

View file

@ -57,21 +57,22 @@ jobs:
needs: [docker] needs: [docker]
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: bitnami/kubectl:1.31
steps: steps:
- name: Checkout - uses: actions/checkout@v4
env:
TOKEN: ${{ secrets.FORGEJO_TOKEN }} - name: Install kubectl
run: | run: |
cd /tmp && git clone --depth=1 "https://djohn:${TOKEN}@code.core.ci/${{ github.repository }}.git" repo curl -LO "https://dl.k8s.io/release/v1.31.0/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
- name: Deploy - name: Deploy
env: env:
KUBECONFIG_DATA: ${{ secrets.KUBE_CONFIG }} KUBECONFIG_DATA: ${{ secrets.KUBE_CONFIG }}
run: | run: |
echo "$KUBECONFIG_DATA" | base64 -d > /tmp/kubeconfig echo "$KUBECONFIG_DATA" | base64 -d > /tmp/kubeconfig
export KUBECONFIG=/tmp/kubeconfig export KUBECONFIG=/tmp/kubeconfig
cd /tmp/repo/k8s/prod cd k8s/prod
kubectl kustomize . | kubectl apply -f - kubectl kustomize . | kubectl apply -f -
kubectl -n books set image deployment/books web=${{ env.REGISTRY }}/books:${{ github.sha }} kubectl -n books set image deployment/books web=${{ env.REGISTRY }}/books:${{ github.sha }}
kubectl -n books rollout status deployment/books --timeout=120s kubectl -n books rollout status deployment/books --timeout=120s