fix: Make ssh and config directories and set correct permissions first

This commit is contained in:
Benjamin Bädorf 2021-06-14 21:44:15 +02:00
parent 75be5446ab
commit 46e42eb1c4
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C

View file

@ -9,6 +9,7 @@ steps:
GITEA_SSH_KEY: GITEA_SSH_KEY:
from_secret: gitea_ssh_key from_secret: gitea_ssh_key
commands: commands:
- mkdir -p ~/.ssh
- echo $GITEA_SSH_KEY > ~/.ssh/id_rsa - echo $GITEA_SSH_KEY > ~/.ssh/id_rsa
- echo <<EOF - echo <<EOF
Host git.b12f.io Host git.b12f.io
@ -16,6 +17,7 @@ steps:
User git User git
HostName git.b12f.io HostName git.b12f.io
EOF >> ~/.ssh/config EOF >> ~/.ssh/config
- chmod -R 600 ~/.ssh
- git clone -b devos git@git.b12f.io:pub-solar/os - git clone -b devos git@git.b12f.io:pub-solar/os
- cd os - cd os
- git remote add devos https://github.com/divnix/devos.git - git remote add devos https://github.com/divnix/devos.git
@ -34,6 +36,7 @@ steps:
GITEA_SSH_KEY: GITEA_SSH_KEY:
from_secret: gitea_ssh_key from_secret: gitea_ssh_key
commands: commands:
- mkdir -p ~/.ssh
- echo $GITEA_SSH_KEY > ~/.ssh/id_rsa - echo $GITEA_SSH_KEY > ~/.ssh/id_rsa
- echo <<EOF - echo <<EOF
Host git.b12f.io Host git.b12f.io
@ -41,13 +44,14 @@ steps:
User git User git
HostName git.b12f.io HostName git.b12f.io
EOF >> ~/.ssh/config EOF >> ~/.ssh/config
- chmod -R 600 ~/.ssh
- git clone -b core git@git.b12f.io:pub-solar/os - git clone -b core git@git.b12f.io:pub-solar/os
- cd os - cd os
- git fetch - git fetch
- git merge devos - git merge devos
- git push origin core - git push origin core
- name: "Notify Success" - name: "Notify success"
image: plugins/matrix image: plugins/matrix
when: when:
status: status:
@ -74,10 +78,11 @@ steps:
TEA_CONFIG: TEA_CONFIG:
from_secret: tea_config from_secret: tea_config
commands: commands:
- mkdir -p ~/.config/tea
- echo $TEA_CONFIG > ~/.config/tea/config.yml - echo $TEA_CONFIG > ~/.config/tea/config.yml
- tea pulls create --base core --head devos - tea pulls create --base core --head devos
- name: notify - name: Notify failure
image: plugins/matrix image: plugins/matrix
when: when:
status: status: