fix: CI pipeline - disable corrupted cache, add pull before push

- build-cli.yml: comment out cache_from/cache_to to avoid BuildKit
  "short read" errors from corrupted registry cache
- default.yml: add git pull --rebase before push in cleanup-and-push
  to handle remote having newer commits
This commit is contained in:
Viktor Barzin 2026-03-15 22:51:08 +00:00
parent c8069f53c8
commit 0c1239030d
2 changed files with 6 additions and 2 deletions

View file

@ -26,5 +26,8 @@ steps:
dockerfile: cli/Dockerfile dockerfile: cli/Dockerfile
context: cli context: cli
auto_tag: true auto_tag: true
cache_from: "registry.viktorbarzin.me:5050/infra:latest" # cache_from/cache_to removed: registry cache corruption causes
cache_to: "type=inline" # "short read: expected 32 bytes" BuildKit errors. Inline cache
# will be re-populated once a clean image is pushed.
# cache_from: "registry.viktorbarzin.me:5050/infra:latest"
# cache_to: "type=inline"

View file

@ -52,6 +52,7 @@ steps:
- "git add stacks/ state/ .woodpecker/ || true" - "git add stacks/ state/ .woodpecker/ || true"
- "git remote set-url origin git@github.com:ViktorBarzin/infra.git" - "git remote set-url origin git@github.com:ViktorBarzin/infra.git"
- "git commit -m 'Woodpecker CI deploy commit [CI SKIP]' || echo 'No changes'" - "git commit -m 'Woodpecker CI deploy commit [CI SKIP]' || echo 'No changes'"
- "GIT_SSH_COMMAND='ssh -i ./secrets/deploy_key -o IdentitiesOnly=yes' git pull --rebase origin master || true"
- "GIT_SSH_COMMAND='ssh -i ./secrets/deploy_key -o IdentitiesOnly=yes' git push origin master" - "GIT_SSH_COMMAND='ssh -i ./secrets/deploy_key -o IdentitiesOnly=yes' git push origin master"
when: when:
status: [success, failure] status: [success, failure]