+22
-6
.tangled/workflows/github.yml
+22
-6
.tangled/workflows/github.yml
···
4
4
5
5
when:
6
6
- event: ["push"]
7
-
branch: ["release"]
7
+
branch: ["release", "test"]
8
8
9
9
engine: nixery
10
+
11
+
dependencies:
12
+
nixpkgs:
13
+
- git
14
+
- openssh
10
15
11
16
steps:
12
17
- name: Write SSH Key
13
18
command: |
14
-
echo $GITHUB_SSH_KEY > ssh_key
15
-
chmod 600 ssh_key
19
+
echo "$KEY_SSH_GITHUB" > /tmp/key-ssh-github
20
+
chmod 600 /tmp/key-ssh-github
21
+
- name: Add base system files
22
+
command: |
23
+
# Avoid missing user with UID 0 error on ssh...
24
+
echo "root:x:0:0:System administrator:/root:/run/current-system/sw/bin/bash" >> /etc/passwd
25
+
26
+
# Turn off SSH host key checking
27
+
echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config
28
+
echo "UserKnownHostsFile /dev/null" >> /etc/ssh/ssh_config
29
+
30
+
echo "Host github.com" >> /etc/ssh/ssh_config
31
+
echo " User git" >> /etc/ssh/ssh_config
32
+
echo " IdentityFile /tmp/key-ssh-github" >> /etc/ssh/ssh_config
16
33
- name: Push to GitHub
17
34
command: |
18
-
export GIT_SSH_COMMAND="ssh -i $(realpath ./ssh_key) -o StrictHostKeyChecking=no"
19
-
git remote add github git@github.com:freshlybakedca.ke/Patisserie
35
+
git remote add github git@github.com:FreshlyBakedCake/Patisserie.git
20
36
git fetch --unshallow origin
21
37
git fetch github
22
-
git push tangled HEAD
38
+
git push github HEAD:refs/heads/release