From e84e474384ffdf33017dea14e26cae58b60ed04c Mon Sep 17 00:00:00 2001 From: Michael Kelly Date: Tue, 11 Jul 2023 23:52:14 -0400 Subject: [PATCH] Mirror to github --- .build.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .build.yml diff --git a/.build.yml b/.build.yml new file mode 100644 index 0000000..d824e3b --- /dev/null +++ b/.build.yml @@ -0,0 +1,21 @@ +image: alpine/edge +secrets: + - 09def2be-6540-44f4-9b5d-419d83564d93 +environment: + REPO: michaelkelly.org + GH_USER: mjkelly +tasks: + - write-ssh-config: | + cat <<_FILE_ >> ~/.ssh/config + Host github.com + IdentityFile ~/.ssh/id_rsa + IdentitiesOnly yes + BatchMode yes + StrictHostKeyChecking no + _FILE_ + - push-to-github: | + cd ~/"${REPO}" + # remove remotes/origin/HEAD so we don't push it + git remote set-head origin -d + git remote add github "git@github.com:${GH_USER}/${REPO}.git" + git push --prune github '+refs/remotes/origin/*:refs/heads/*' '+refs/tags/*:refs/tags/*' -- 2.45.2