From bc011bfa6bd3a231cae079a20d1e853c72066917 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Thu, 19 Dec 2024 09:39:17 -0700 Subject: [PATCH] chore: update .build.yml --- .build.yml | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/.build.yml b/.build.yml index 71f3000..13c389e 100644 --- a/.build.yml +++ b/.build.yml @@ -1,13 +1,27 @@ image: alpine/edge +packages: + - git + secrets: - 88cce185-d2ec-4573-9546-e33f36f79bbf -sources: - - git+ssh://git@git.sr.ht/~swaits/typst-collection + +environment: + # repo and user names on both sr.ht and github + REPO: typst-collection + USER: swaits + tasks: - - mirror-to-github: | - cd ~/typst-collection - ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts - # Explicitly fetch all branches & tags + - clone: | + git clone --origin origin "git+ssh://git@git.sr.ht/~$USER/$REPO" + + - fetch-all-branches: | + cd "~/$REPO" git fetch origin '+refs/heads/*:refs/heads/*' '+refs/tags/*:refs/tags/*' --prune - git remote add github git@github.com:swaits/typst-collection.git + + - setup-github-remote: | + ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts + git remote add github "git@github.com:$USER/$REPO.git" + + - mirror-to-github: | + cd "~/$REPO" git push --mirror github