-
Notifications
You must be signed in to change notification settings - Fork 0
/
.build.yml
19 lines (18 loc) · 867 Bytes
/
.build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
image: alpine/edge
secrets:
- af3888de-0580-42e3-86a8-69d9d97b70cf
sources:
- https://git.sr.ht/~rolandog/pam-u2f-totp-config
tasks:
- validate-gh-fingerprint-and-config-ssh: |
tmp_dir=$(mktemp -d -p $HOME)
ssh-keyscan -t rsa github.com > $tmp_dir/github_host
ssh-keygen -lf $tmp_dir/github_host > $tmp_dir/github_fingerprint
grep -R "nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8" $tmp_dir/github_fingerprint
cat $tmp_dir/github_host >> ~/.ssh/known_hosts
rm -rf $tmp_dir
echo -e "Host github.com\n IdentityFile ~/.ssh/id_rsa\n IdentitiesOnly yes\n BatchMode yes\n" >> ~/.ssh/config
- mirror-to-github: |
cd ~/pam-u2f-totp-config
git remote add github git@github.com:rolandog/pam-u2f-totp-config.git
git push --prune github +refs/remotes/origin/*:refs/heads/* +refs/tags/*:refs/tags/* main