-
Notifications
You must be signed in to change notification settings - Fork 29
31 lines (29 loc) · 927 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Build and Publish
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-publish:
name: Buid and Publish CS3APIS
runs-on: ubuntu-latest
container: cs3org/cs3apis-build:master
steps:
- name: setup-ssh
env: # Or as an environment variable
SSH_KEY: ${{ secrets.ssh_key}}
run: |
mkdir /root/.ssh
python3 -c "import os; file = open('/root/.ssh/id_rsa', 'w'); file.write(os.environ['SSH_KEY']); file.close()"
shasum /root/.ssh/id_rsa
chmod 400 /root/.ssh/id_rsa
stat /root/.ssh/id_rsa
touch /root/.ssh/known_hosts
chmod 400 /root/.ssh/known_hosts
ssh-keyscan -H github.com > /etc/ssh/ssh_known_hosts 2> /dev/null
cat /root/.ssh/id_rsa
- name: build-and-publish
run: |
cat /root/.ssh/id_rsa
cs3apis-build