Compare commits

...

2 Commits

Author SHA1 Message Date
Nikolai Rodionov 92ccfd804b
Update CI a bit
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/documentation Pipeline was successful Details
2024-05-06 09:43:31 +02:00
Nikolai Rodionov 8533398f2a
Update CI a bit 2024-05-06 09:43:25 +02:00
2 changed files with 3 additions and 32 deletions

View File

@ -19,6 +19,8 @@ steps:
- cat ~/.ssh/id_ed25519
- chmod 0600 ~/.ssh/id_ed25519
- protoc --proto_path=./proto --doc_out=. --doc_opt=markdown,README.md $(find ./proto -type f -iname "*.proto")
# To make sure there is always a change, even when protos are not updated
- echo "Generated on $(date)" >> README.md
- eval `ssh-agent`
- ssh-add ~/.ssh/id_ed25519
- git config --global user.email "allanger@badhouseplants.net"
@ -27,5 +29,5 @@ steps:
- git -C /tmp/repo checkout generated-documentation
- mv README.md /tmp/repo/README.md
- git -C /tmp/repo add .
- git -C /tmp/repo commit -m "Update documentation"
- git -C /tmp/repo commit -m "Update documentation from $CI_COMMIT_SHA"
- git -C /tmp/repo push

View File

@ -1,31 +0,0 @@
---
when:
event:
- push
branch: main
steps:
lint:
name: Generate docs
image: pseudomuto/protoc-gen-doc
secrets:
- softplayer_bot_ssh_key
- git_known_hosts
commands:
- mkdir -p ~/.ssh
- apk update && apk add git openssh
- echo $SOFTPLAYER_BOT_SSH_KEY | base64 -d > ~/.ssh/id_ed25519
- echo $GIT_KNOWN_HOSTS > ~/.ssh/known_hosts
- cat ~/.ssh/id_ed25519
- chmod 0600 ~/.ssh/id_ed25519
- protoc --proto_path=./proto --doc_out=. --doc_opt=markdown,readme.md $(find ./proto -type f -iname "*.proto")
- eval `ssh-agent`
- ssh-add ~/.ssh/id_ed25519
- git config --global user.email "allanger@badhouseplants.net"
- git config --global user.name "Softplayer Bot"
- git clone git@git.badhouseplants.net:softplayer/softplayer-proto.git /tmp/repo
- git -C /tmp/repo checkout generated-documentation
- mv README.md /tmp/repo/README.md
- git -C /tmp/repo add .
- git -C /tmp/repo commit -m "Update documentation"
- git -C /tmp/repo push