ci: make mirror-github step failure-tolerant, skip if no SSH key
This commit is contained in:
@@ -345,10 +345,12 @@ steps:
|
||||
|
||||
mirror-github:
|
||||
image: alpine/git
|
||||
failure: ignore
|
||||
environment:
|
||||
GITHUB_SSH_KEY:
|
||||
from_secret: github_ssh_key
|
||||
commands:
|
||||
- "[ -z \"$GITHUB_SSH_KEY\" ] && echo 'No SSH key configured, skipping mirror' && exit 0"
|
||||
- mkdir -p ~/.ssh
|
||||
- echo "$GITHUB_SSH_KEY" > ~/.ssh/id_ed25519
|
||||
- chmod 600 ~/.ssh/id_ed25519
|
||||
|
||||
Reference in New Issue
Block a user