prototypey.org - atproto lexicon typescript toolkit - mirror https://github.com/tylersayshi/prototypey
1name: sync-tangled
2
3on:
4 push:
5 branches:
6 - main
7
8jobs:
9 sync:
10 runs-on: ubuntu-latest
11 environment: tangled-sync
12 steps:
13 - uses: actions/checkout@v4.1.7
14 with:
15 fetch-depth: 0
16 ref: ${{ github.event.pull_request.head.sha }}
17 - name: sync tangled
18 env:
19 TANGLED_SSH_PRIVATE_KEY: ${{ secrets.TANGLED_SSH_PRIVATE_KEY }}
20 run: |
21 set -euo pipefail
22 # Turn off strict SSH key checking
23 mkdir -p ~/.ssh
24 echo "Host *
25 StrictHostKeyChecking no
26 UserKnownHostsFile=/dev/null" > ~/.ssh/config
27
28 # Write SSH key to disk
29 echo "$TANGLED_SSH_PRIVATE_KEY" > ~/.ssh/tangled_key
30 chmod 600 ~/.ssh/tangled_key
31
32 # Configure SSH to use the key for tangled.sh
33 echo "Host tangled.sh
34 IdentityFile ~/.ssh/tangled_key" >> ~/.ssh/config
35
36 chmod 600 ~/.ssh/config
37
38 # Set git user
39 git config --global user.name "Prototypey Bot"
40 git config --global user.email "bot@prototypey.org"
41
42 git remote add tangled git@tangled.sh:tylur.dev/prototypey
43 git push -f --all tangled
44 git push -f --tags tangled