projects

minerva

Personal learning

feat: update readme, add mirror ci

daniel daum committed parent c1399d5 commit 0639e6dVerified signature by Daniel Daum

Verifiedsigned by Daniel Daum with SSH key SHA256:drhIqfmUzuijEg5lpF1wfHhbG2Z4ebL9Lf+nLCJWAfg

Showing 2 changed files with 39 additions and 30 deletions.

.gitea/workflows/mirror.yaml +34 −29
@@ -1,39 +1,44 @@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:8    push:9        branches:10            - main11    workflow_dispatch:9  push:10    branches:11      - main12  workflow_dispatch:12131314jobs:14    mirror:15        runs-on: ubuntu-latest16        env:17            REPO: ${{ github.event.repository.name }}18        steps:19            # full history, and origin/main is the newest main, so a late or20            # retried run never rolls the mirrors back21            - name: Checkout22              uses: actions/checkout@v423              with:24                  fetch-depth: 015  mirror:16    runs-on: ubuntu-latest17    env:18      REPO: ${{ github.event.repository.name }}19    steps:20      # full history, and origin/main is the newest main, so a late or21      # retried run never rolls the mirrors back22      - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.023        with:24          fetch-depth: 0252526            - name: Mirror to GitHub27              run: |28                  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/main26      - name: Mirror to GitHub27        env:28          TOKEN: ${{ secrets.GH_MIRROR_TOKEN }}29        run: |30          set -euo pipefail31          git push --force "https://x-access-token:${TOKEN}@github.com/daniel-daum/${REPO}.git" refs/remotes/origin/main:refs/heads/main303231            - name: Mirror to Tangled32              run: |33                  set -euo pipefail34                  mkdir -p ~/.ssh35                  printf '%s\n' "${{ secrets.TANGLED_MIRROR_KEY }}" > ~/.ssh/tangled36                  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/main33      - name: Mirror to Tangled34        env:35          KEY: ${{ secrets.TANGLED_MIRROR_KEY }}36          KNOWN_HOSTS: ${{ vars.TANGLED_KNOWN_HOSTS }}37        run: |38          set -euo pipefail39          mkdir -p ~/.ssh40          printf '%s\n' "$KEY" > ~/.ssh/tangled41          chmod 600 ~/.ssh/tangled42          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
README.md +5 −1
@@ -1,3 +1,7 @@11# minerva223classes, homework, notebooks, small tests and projects3Practice, homework, classes, notebooks, small tests, and small learning projects45| Directory | Description                    |6| --------- | ------------------------------ |7| CIS 27    | Data structures and Algorithms |