ci: use mounted SSH keys for mirror job
Some checks failed
CI/CD / Test (push) Successful in 31s
CI/CD / Lint (push) Successful in 40s
CI/CD / Generate SBOM (push) Successful in 18s
CI/CD / Build (darwin-amd64) (push) Successful in 22s
CI/CD / Build (linux-amd64) (push) Successful in 22s
CI/CD / Build (darwin-arm64) (push) Successful in 22s
CI/CD / Build (linux-arm64) (push) Successful in 22s
CI/CD / Build & Push Docker Image (push) Successful in 22s
CI/CD / Mirror to GitHub (push) Failing after 10s
CI/CD / Release (push) Has been skipped
Some checks failed
CI/CD / Test (push) Successful in 31s
CI/CD / Lint (push) Successful in 40s
CI/CD / Generate SBOM (push) Successful in 18s
CI/CD / Build (darwin-amd64) (push) Successful in 22s
CI/CD / Build (linux-amd64) (push) Successful in 22s
CI/CD / Build (darwin-arm64) (push) Successful in 22s
CI/CD / Build (linux-arm64) (push) Successful in 22s
CI/CD / Build & Push Docker Image (push) Successful in 22s
CI/CD / Mirror to GitHub (push) Failing after 10s
CI/CD / Release (push) Has been skipped
This commit is contained in:
@@ -201,6 +201,8 @@ jobs:
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && vars.MIRROR_ENABLED != 'false'
|
||||
container:
|
||||
image: debian:bookworm-slim
|
||||
volumes:
|
||||
- /root/.ssh:/root/.ssh:ro
|
||||
steps:
|
||||
- name: Install git
|
||||
run: apt-get update && apt-get install -y --no-install-recommends git openssh-client ca-certificates && rm -rf /var/lib/apt/lists/*
|
||||
@@ -208,7 +210,7 @@ jobs:
|
||||
- name: Setup SSH key
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.GITHUB_MIRROR_SSH_KEY }}" > ~/.ssh/id_ed25519
|
||||
cp /root/.ssh/id_ed25519 ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
ssh-keyscan github.com >> ~/.ssh/known_hosts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user