feat: adding multi-arch image builds and kubectl manifest deployment
Some checks failed
Test build-and-push (self-test) / Build tiny multi-arch image (push) Failing after 29s

This commit is contained in:
2026-07-13 19:26:29 -03:00
parent 3fe11a16bc
commit f55d654e72
4 changed files with 183 additions and 2 deletions

View File

@@ -41,6 +41,7 @@ jobs:
| `platforms` | ❌ | `linux/amd64,linux/arm64` | Target build platforms |
| `build_context` | ❌ | `.` | Docker build context |
| `build_dockerfile` | ❌ | `Dockerfile` | Dockerfile path |
| `build_args` | ❌ | _(empty)_ | Build arguments, one `KEY=VALUE` per line; each becomes a `--build-arg` |
| `docker_host` | ❌ | `docker-build.haven` | Remote builder hostname |
| `docker_user` | ❌ | `root` | SSH user for remote builder |
@@ -72,6 +73,38 @@ jobs:
| `namespace` | ❌ | `default` | Kubernetes namespace |
| `kube_version` | ❌ | `stable` | kubectl version (`stable` or e.g. `v1.31.0`) |
### `kubectl-apply`
Validates a kubeconfig, installs kubectl, and applies Kubernetes manifest(s) that live inside the repository (the non-Docker, in-repo analog of `ssh-deploy`'s `compose_files`). Pair it with `deploy-restart` when you also want a rollout restart after the apply — or use it alone for resources that don't need a restart (CronJob, Service, Ingress, Secrets, etc.).
```yaml
jobs:
deploy:
runs-on: ubuntu-amd64
needs: build
steps:
- uses: https://git.ivanch.me/ivanch/pipeline-actions/kubectl-apply@main
with:
kube_config: ${{ secrets.KUBE_CONFIG }}
manifest: Mindforge.API/deploy/mindforge-api.yaml
# or apply several at once:
# manifests: deploy/svc.yaml,deploy/deployment.yaml
# optional:
# namespace: mindforge # adds -n when set (manifests may also self-declare)
```
| Input | Required | Default | Description |
|---|---|---|---|
| `kube_config` | ✅ | — | Full kubeconfig YAML (use secrets) |
| `manifest` | ❌ | _(empty)_ | Single manifest path (relative to repo root) to apply |
| `manifests` | ❌ | _(empty)_ | Space-/comma-separated list of manifest paths to apply (each gets its own `kubectl apply -f`) |
| `namespace` | ❌ | _(empty)_ | Adds `-n <ns>` when non-empty; manifests may also declare their own namespace |
| `kube_version` | ❌ | `stable` | kubectl version (`stable` or e.g. `v1.31.0`) |
> At least one of `manifest` or `manifests` must be set; a missing file fails the step (the manifest must live in the repo).
---
### `ssh-deploy`
SSH into a remote host and run `docker compose pull` + `docker compose up -d --force-recreate` to deploy the latest images. No third-party SSH action — uses native `ssh` and `ssh-keyscan`.