saturn
- 187 commits
- 2 branches
- 0 tags
- updated
- CI 2/2
ci: update ci mirror (#3)
updating mirror for 6.0.x gitea runners Reviewed-on: https://code.aardvark-halibut.ts.net/daniel/saturn/pulls/3 Co-authored-by: daniel daum <daniel@danieldaum.net>
Showing 1 changed file with 13 additions and 8 deletions.
.gitea/workflows/mirror.yaml
+13 −8
@@ -1,7 +1,8 @@11# mirrors main to github and tangled on every push. gitea is the source of22# truth, so both get force-pushed to match it. the same file works in every33# repo: it pushes to the repo with the same name on github and tangled.4# needs the GH_MIRROR_TOKEN and TANGLED_MIRROR_KEY secrets4# needs the GH_MIRROR_TOKEN and TANGLED_MIRROR_KEY secrets, and the5# TANGLED_KNOWN_HOSTS variable (ssh-keyscan tangled.org, checked once)56name: Mirror6778on:@@ -18,22 +19,26 @@ jobs:1819 steps:1920 # full history, and origin/main is the newest main, so a late or2021 # retried run never rolls the mirrors back21 - name: Checkout22 uses: actions/checkout@v422 - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.02323 with:2424 fetch-depth: 025252626 - name: Mirror to GitHub27 env:28 TOKEN: ${{ secrets.GH_MIRROR_TOKEN }}2729 run: |2830 set -euo pipefail29 git push --force "https://x-access-token:${{ secrets.GH_MIRROR_TOKEN }}@github.com/daniel-daum/${REPO}.git" refs/remotes/origin/main:refs/heads/main31 git push --force "https://x-access-token:${TOKEN}@github.com/daniel-daum/${REPO}.git" refs/remotes/origin/main:refs/heads/main30323133 - name: Mirror to Tangled34 env:35 KEY: ${{ secrets.TANGLED_MIRROR_KEY }}36 KNOWN_HOSTS: ${{ vars.TANGLED_KNOWN_HOSTS }}3237 run: |3338 set -euo pipefail3439 mkdir -p ~/.ssh35 printf '%s\n' "${{ secrets.TANGLED_MIRROR_KEY }}" > ~/.ssh/tangled40 printf '%s\n' "$KEY" > ~/.ssh/tangled3641 chmod 600 ~/.ssh/tangled37 ssh-keyscan tangled.org >> ~/.ssh/known_hosts38 export GIT_SSH_COMMAND="ssh -i ~/.ssh/tangled -o IdentitiesOnly=yes"39 git push --force "git@tangled.org:danieldaum.net/${REPO}" refs/remotes/origin/main:refs/heads/main42 printf '%s\n' "$KNOWN_HOSTS" > ~/.ssh/known_hosts43 export GIT_SSH_COMMAND="ssh -i ~/.ssh/tangled -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes"44 git push --force "daum.dev@tangled.org:daum.dev/${REPO}" refs/remotes/origin/main:refs/heads/main