holonet
- 19 commits
- 1 branch
- 0 tags
- updated
fix: add openssh dependency
SignedGitea couldn't verify the signature.
Showing 1 changed file with 23 additions and 16 deletions.
.tangled/workflows/mirror.yaml
+23 −16
@@ -1,6 +1,7 @@11# mirrors main to github and gitea on every push. tangled is the source of2# truth, so both get force-pushed to match it. needs the GH_MIRROR_TOKEN and3# GITEA_MIRROR_TOKEN secrets2# truth, so both get force-pushed to match it. the same file works in every3# repo: it pushes to the repo with the same name on github and gitea.4# needs the GH_MIRROR_TOKEN and GITEA_MIRROR_KEY secrets4556when:67 - event: ["push", "manual"]@@ -8,6 +9,10 @@ when:89910engine: "nixery"101112dependencies:13 nixpkgs:14 - openssh151116steps:1217 # spindle clones one commit deep (depth: 0 means 1 too), and the mirrors1318 # need the whole history. this also points origin/main at the newest main,@@ -20,20 +25,22 @@ steps:2025 - name: "Mirror to GitHub"2126 command: |2227 set -euo pipefail23 git push --force "https://x-access-token:${GH_MIRROR_TOKEN}@github.com/daniel-daum/saturn.git" refs/remotes/origin/main:refs/heads/main28 git push --force "https://x-access-token:${GH_MIRROR_TOKEN}@github.com/daniel-daum/${TANGLED_REPO_NAME}.git" refs/remotes/origin/main:refs/heads/main242930 # over ssh to git-ssh, which skips cloudflare. https to git.danieldaum.net31 # goes through it, and its bot protection blocks spindle at random2532 - name: "Mirror to Gitea"2633 command: |27 set -euo pipefail28 29 # ssh refuses to run without a passwd entry, and nixery images have none30 mkdir -p /etc31 [ -e /etc/passwd ] || echo "root:x:0:0:root:${HOME}:/bin/bash" > /etc/passwd32 33 mkdir -p "${HOME}/.ssh"34 printf '%s\n' "${GITEA_MIRROR_KEY}" > "${HOME}/.ssh/gitea"35 chmod 600 "${HOME}/.ssh/gitea"36 ssh-keyscan -p 2222 git-ssh.danieldaum.net > "${HOME}/.ssh/known_hosts"37 38 export GIT_SSH_COMMAND="ssh -i ${HOME}/.ssh/gitea -o IdentitiesOnly=yes -o UserKnownHostsFile=${HOME}/.ssh/known_hosts"39 git push --force "ssh://git@git-ssh.danieldaum.net:2222/daniel-daum/${TANGLED_REPO_NAME}.git" refs/remotes/origin/main:refs/heads/main34 set -euo pipefail3536 # ssh refuses to run without a passwd entry, and nixery images have none37 mkdir -p /etc38 [ -e /etc/passwd ] || echo "root:x:0:0:root:${HOME}:/bin/bash" > /etc/passwd3940 mkdir -p "${HOME}/.ssh"41 printf '%s\n' "${GITEA_MIRROR_KEY}" > "${HOME}/.ssh/gitea"42 chmod 600 "${HOME}/.ssh/gitea"43 ssh-keyscan -p 2222 git-ssh.danieldaum.net > "${HOME}/.ssh/known_hosts"4445 export GIT_SSH_COMMAND="ssh -i ${HOME}/.ssh/gitea -o IdentitiesOnly=yes -o UserKnownHostsFile=${HOME}/.ssh/known_hosts"46 git push --force "ssh://git@git-ssh.danieldaum.net:2222/daniel-daum/${TANGLED_REPO_NAME}.git" refs/remotes/origin/main:refs/heads/main