bestdadjokes/.forgejo/workflows/deploy.yml
djg a3193fb40d
Some checks failed
Build and Deploy / deploy (push) Failing after 30s
ci: switch to Docker image build and kubectl rollout
2026-09-21 22:25:39 +00:00

30 lines
817 B
YAML

name: Build and Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build image
run: |
docker build \
-t git.ch4t.buzz/djg/bestdadjokes:${{ github.sha }} \
-t git.ch4t.buzz/djg/bestdadjokes:latest \
.
- name: Push to registry
run: |
docker push git.ch4t.buzz/djg/bestdadjokes:${{ github.sha }}
docker push git.ch4t.buzz/djg/bestdadjokes:latest
- name: Roll out to k8s
run: |
kubectl set image deployment/static-bdj \
nginx=git.ch4t.buzz/djg/bestdadjokes:${{ github.sha }} \
-n default
kubectl rollout status deployment/static-bdj -n default --timeout=120s