start of infra
This commit is contained in:
parent
faa14e2778
commit
2bbe23c1b6
2 changed files with 30 additions and 0 deletions
23
.woodpecker/upgrade-submodule.yaml
Normal file
23
.woodpecker/upgrade-submodule.yaml
Normal file
|
@ -0,0 +1,23 @@
|
|||
when:
|
||||
- event: manual
|
||||
- event: cron
|
||||
cron: update_submodules
|
||||
|
||||
steps:
|
||||
- name: submodule update
|
||||
secrets: [deploy_key]
|
||||
image: debian:bookworm-backports
|
||||
commands:
|
||||
- mkdir ~/.ssh && echo "$DEPLOY_KEY" > ~/.ssh/id_deploy_key && cp ssh_known_hosts ~/.ssh/known_hosts
|
||||
- ls -lah ~/.ssh
|
||||
- cat ~/.ssh/id_deploy_key
|
||||
- chmod go-rwX -Rv ~/.ssh
|
||||
# ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
|
||||
- apt update && apt install -y git git-lfs
|
||||
- git config core.sshCommand 'ssh -vi ~/.ssh/id_deploy_key -o IdentitiesOnly=yes'
|
||||
- git config --global user.email 'ci-updater@simcop2387.info'
|
||||
- git config --global user.name 'CI Auto-updater'
|
||||
- git config --global pull.rebase false
|
||||
- ./update-submodules.sh
|
||||
- git remote set-url origin git@gitea.simcop2387.info:simcop2387/vllm-containers.git
|
||||
- GIT_TRACE=1 git push origin HEAD
|
7
update-submodules.sh
Executable file
7
update-submodules.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
git submodule foreach --recursive git fetch --all
|
||||
git submodule foreach git reset --hard origin/main
|
||||
git diff-index --quiet HEAD || git commit -am 'Automatic update submodule'
|
Loading…
Add table
Reference in a new issue