33 lines
1019 B
YAML
33 lines
1019 B
YAML
name: Deploy tsrun
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
deploy:
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Write embedded manifest
|
|
run: |
|
|
mkdir -p secrets
|
|
printf '%s' '${{ secrets.TSRUN_MANIFEST_JSON }}' > secrets/tsrun.manifest.json
|
|
|
|
- name: Build and push
|
|
run: |
|
|
TAG=${{ gitea.sha }}
|
|
IMAGE=registry.neko-piranha.ts.net/astral/tsrun
|
|
docker buildx create --use --name tsrun-bootstrap-builder || docker buildx use tsrun-bootstrap-builder
|
|
docker buildx build --platform linux/amd64 -t $IMAGE:$TAG -t $IMAGE:latest --push .
|
|
|
|
- name: Configure kubectl
|
|
run: |
|
|
mkdir -p ~/.kube
|
|
printf '%s' '${{ secrets.KUBECONFIG_B64 }}' | base64 -d > ~/.kube/config
|
|
|
|
- name: Rollout
|
|
run: |
|
|
kubectl set image deployment/tsrun tsrun=registry.neko-piranha.ts.net/astral/tsrun:${{ gitea.sha }} -n default
|
|
kubectl rollout status deployment/tsrun -n default --timeout=180s
|