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