tangled
alpha
login
or
join now
gwen.works
/
to-tangled
11
fork
atom
push to a tangled.sh mirror (mirrored from github of course)
11
fork
atom
overview
issues
pulls
pipelines
๐ Initial commit
gwen.works
10 months ago
a460b951
+46
1 changed file
expand all
collapse all
unified
split
action.yml
+46
action.yml
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
name: Push to tangled.sh
2
+
description: Push code to a tangled.sh mirror repository
3
+
4
+
inputs:
5
+
repo:
6
+
description: The name of the tangled.sh repo to push to
7
+
required: true
8
+
knot:
9
+
description: Hostname of the knot to push to
10
+
default: tangled.sh
11
+
ssh-key:
12
+
description: Private SSH key with write access to the tangled.sh repo
13
+
required: true
14
+
15
+
runs:
16
+
using: composite
17
+
steps:
18
+
- uses: actions/checkout@v4.1.7
19
+
with:
20
+
fetch-depth: 0
21
+
ref: ${{ github.event.pull_request.head.sha }}
22
+
- name: sync tangled
23
+
shell: bash
24
+
env:
25
+
TANGLED_SSH_KEY: ${{ inputs.ssh-key }}
26
+
run: |
27
+
set -euo pipefail
28
+
# Turn off strict SSH key checking
29
+
mkdir -p ~/.ssh
30
+
echo "Host *
31
+
StrictHostKeyChecking no
32
+
UserKnownHostsFile=/dev/null" > ~/.ssh/config
33
+
34
+
# Write SSH key to disk
35
+
echo "$TANGLED_SSH_KEY" > ~/.ssh/tangled_key
36
+
chmod 600 ~/.ssh/tangled_key
37
+
38
+
# Configure SSH to use the key for tangled.sh
39
+
echo "Host tangled.sh
40
+
IdentityFile ~/.ssh/tangled_key" >> ~/.ssh/config
41
+
42
+
chmod 600 ~/.ssh/config
43
+
44
+
git remote add tangled git@${{ inputs.knot }}:${{ inputs.repo }}
45
+
git push -f --all tangled
46
+
git push -f --tags tangled