fix: use ubuntu runner for deploy (has git)
This commit is contained in:
parent
6b6e3f0c15
commit
0d353037c2
1 changed files with 8 additions and 7 deletions
|
|
@ -57,21 +57,22 @@ jobs:
|
|||
needs: [docker]
|
||||
if: github.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: bitnami/kubectl:1.31
|
||||
steps:
|
||||
- name: Checkout
|
||||
env:
|
||||
TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install kubectl
|
||||
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
|
||||
env:
|
||||
KUBECONFIG_DATA: ${{ secrets.KUBE_CONFIG }}
|
||||
run: |
|
||||
echo "$KUBECONFIG_DATA" | base64 -d > /tmp/kubeconfig
|
||||
export KUBECONFIG=/tmp/kubeconfig
|
||||
cd /tmp/repo/k8s/prod
|
||||
cd k8s/prod
|
||||
kubectl kustomize . | kubectl apply -f -
|
||||
kubectl -n books set image deployment/books web=${{ env.REGISTRY }}/books:${{ github.sha }}
|
||||
kubectl -n books rollout status deployment/books --timeout=120s
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue