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

This commit is contained in:
2025-12-13 11:27:46 +00:00
parent cb677053e6
commit 23e57d9379

View File

@@ -201,6 +201,8 @@ jobs:
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && vars.MIRROR_ENABLED != 'false' if: github.event_name == 'push' && github.ref == 'refs/heads/main' && vars.MIRROR_ENABLED != 'false'
container: container:
image: debian:bookworm-slim image: debian:bookworm-slim
volumes:
- /root/.ssh:/root/.ssh:ro
steps: steps:
- name: Install git - 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/* 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 - name: Setup SSH key
run: | run: |
mkdir -p ~/.ssh 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 chmod 600 ~/.ssh/id_ed25519
ssh-keyscan github.com >> ~/.ssh/known_hosts ssh-keyscan github.com >> ~/.ssh/known_hosts