A spindle template to mirror commits on main from Tangled to GitHub
mirror-to-github.yaml edited
25 lines 609 B view raw
1# .tangled/workflows/mirror-to-github.yml 2 3when: 4 - event: ["push", "manual"] 5 branch: ["main"] 6 7engine: "nixery" 8 9clone: 10 depth: 0 11 12dependencies: 13 nixpkgs: 14 - git 15 16steps: 17 - name: "Mirror to GitHub" 18 command: | 19 git fetch --unshallow origin || true 20 git fetch origin refs/heads/main:refs/heads/main 21 git remote add github https://x-access-token:${GITHUB_PAT}@github.com/${GITHUB_USERNAME}/${GITHUB_REPO_NAME}.git 22 git push github refs/heads/main:refs/heads/main --force 23 environment: 24 GITHUB_USERNAME: "YOUR-GITHUB-USERNAME" 25 GITHUB_REPO_NAME: "YOUR-GITHUB_REPO"