Skip to content

Merge pull request #181 from seanwatters/rsky-pds-clippy #6

Merge pull request #181 from seanwatters/rsky-pds-clippy

Merge pull request #181 from seanwatters/rsky-pds-clippy #6

Workflow file for this run

name: Mirror to forge.blacksky.community
on:
push: {}
workflow_dispatch: {}
permissions:
contents: read
jobs:
tangle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: push to forge knot
env:
TANGLED_KEY: ${{ secrets.TANGLED_KEY }}
run: |
set -euo pipefail
mkdir -p ~/.ssh
chmod 700 ~/.ssh
printf '%s\n' "$TANGLED_KEY" > ~/.ssh/tangled_key
chmod 600 ~/.ssh/tangled_key
cat > ~/.ssh/config <<'EOF'
Host knot.blacksky.community
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
IdentityFile ~/.ssh/tangled_key
IdentitiesOnly yes
EOF
chmod 600 ~/.ssh/config
# actions/checkout leaves origin branches under refs/remotes/origin/*
# — git push --mirror would copy those as remote-tracking refs on
# the destination instead of as proper branches. Materialize them
# under refs/heads/* first so the mirror push lands them as real
# branches that forge can render.
#
# Detach HEAD before fetching so the fetch can overwrite
# refs/heads/<currently-checked-out-branch> without git refusing.
git -c advice.detachedHead=false checkout --detach
git fetch origin '+refs/heads/*:refs/heads/*' '+refs/tags/*:refs/tags/*'
git remote add tangled git@knot.blacksky.community:blackskyweb.xyz/rsky
git push --mirror tangled