Commit Graph

19 Commits

Author SHA1 Message Date
e8eb378541 add self-test workflow
Some checks failed
Test Actions (self-test) / Build tiny multi-arch image (push) Successful in 13s
Test Actions (self-test) / Test SSH deploy action (push) Failing after 17s
Test Actions (self-test) / Test Kubernetes actions (push) Failing after 54s
2026-07-13 21:03:08 -03:00
e6b9d99305 docs: add job name: to all usage snippets + rule requiring named jobs 2026-07-13 19:49:47 -03:00
4ca132ea0d fix(build-and-push): use real ssh user in docker context URL (was literal '***')
All checks were successful
Test build-and-push (self-test) / Build tiny multi-arch image (push) Successful in 9s
2026-07-13 19:45:38 -03:00
fc7ed6bd15 fix: strip CRLF from inputs + add .gitattributes (eol=lf) -- fixes ssh username 'invalid characters'
Some checks failed
Test build-and-push (self-test) / Build tiny multi-arch image (push) Failing after 2s
2026-07-13 19:39:29 -03:00
f55d654e72 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
2026-07-13 19:26:29 -03:00
3fe11a16bc fix(build-and-push): build via docker context, not buildx-create-over-ssh
All checks were successful
Test build-and-push (self-test) / Build tiny multi-arch image (push) Successful in 9s
The 'docker buildx create --name X ssh://...' driver hangs against
docker-build.haven with 'waiting for connection: context deadline exceeded',
even though SSH, the daemon, and dial-stdio all work. Root cause is that
docker-container-driver-over-SSH path; the remote daemon's own default
buildkit (containerd-snapshotter) works fine.

Rework:
- create a docker *context* over SSH and run 'docker --context remote-builder
  buildx build --push' directly (drops docker/build-push-action, which needs
  a named builder)
- (re)install qemu/binfmt on the remote each run when an arm* platform is
  requested (binfmt is kernel state, lost on daemon/host restart -- this was
  causing 'exec format error' for arm64 after the daemon was restarted)
- gentags now emits -t args for the direct buildx invocation

Validated end-to-end on real infra: multi-arch amd64+arm64 build + push to
git.ivanch.me/ivanch/pipeline-actions-selftest:citest, manifest confirmed
multi-arch.
2026-07-12 13:54:52 -03:00
dec613eb63 fix(build-and-push): hard-timeout the SSH probe so it can't hang
All checks were successful
Test build-and-push (self-test) / Build tiny multi-arch image (push) Successful in 8s
ConnectTimeout only bounds the TCP handshake; wrap ssh in a 25s timeout
plus keepalives so a firewall that accepts SYN then drops packets fails
fast with a clear diagnostic instead of hanging the runner.
2026-07-12 13:38:33 -03:00
677c57e6f9 test(ci): add self-test workflow for build-and-push action
Some checks failed
Test build-and-push (self-test) / Build tiny multi-arch image (push) Has been cancelled
Builds a tiny inline alpine image through build-and-push against the
remote buildx builder and asserts the pushed manifest is multi-arch.
Pushes to a throwaway :citest tag so it never touches real images.
Triggered on workflow_dispatch and on changes to the action.
2026-07-12 13:27:26 -03:00
a7dfc7c7dd chore(build-and-push): add fail-fast SSH probe to remote builder host
Surfaces the real reachability/auth error instead of buildx's slow
'context deadline exceeded' when the runner can't reach the daemon.
2026-07-12 13:24:34 -03:00
57e25a8fef fix(build-and-push): create buildx builder from SSH endpoint, drop colliding context
buildx refuses a builder instance whose name matches an existing docker
context. Create the builder directly from the ssh:// endpoint and clean up
any leftover context/builder of the same name first (idempotent re-runs).
2026-07-12 12:51:48 -03:00
8689226ca6 fix(build-and-push): pass docker context as positional arg to buildx create
--context is not supported on this buildx version; the context name is a
positional [CONTEXT|ENDPOINT] argument
2026-07-12 12:47:17 -03:00
39bdf82fac fix(build-and-push): stop DOCKER_HOST overriding remote-builder context
- DOCKER_HOST env var was set to the builder hostname, which Docker treats
  as tcp://host:2375 and which overrides the active docker context, so the
  SSH remote-builder context was ignored (Cannot connect to tcp://docker-build.haven:2375)
- context endpoint used a literal ssh://***@ instead of the docker_user input
- create an actual buildx builder instance named remote-builder (build-push-action
  needs a builder instance, not just a context)
2026-07-12 12:38:33 -03:00
1dc0cfb5ce updating pipeline 2026-07-10 19:22:14 -03:00
740cbef5c1 feat: add composite action to build and push multi-arch images via remote Docker builder 2026-07-10 18:14:43 -03:00
ea92f3e55d feat: add build-and-push and ssh-deploy composite actions with image tagging support 2026-07-10 18:10:30 -03:00
e098b7e0c5 adding image tag 2026-07-10 17:48:15 -03:00
fb6584ea84 docs: use full Gitea URL for pipeline-actions uses: references 2026-07-10 10:43:20 -03:00
586ba48de7 feat: new ssh-deploy job 2026-07-10 07:19:53 -03:00
5c11a6cf44 feat: reusable build-and-push and deploy-restart composite actions
- build-and-push: multi-arch Docker build via remote Buildx builder over SSH
- deploy-restart: kubectl rollout restart with kubeconfig validation
- README with usage examples and required secrets
2026-07-08 19:57:15 -03:00