-
Notifications
You must be signed in to change notification settings - Fork 7
39 lines (34 loc) · 1.23 KB
/
copyreleasefiles.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
32
33
34
35
36
37
name: Copy Release Files to Fileserver
on:
workflow_dispatch:
inputs:
version:
required: true
type: string
jobs:
copy-files:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: gravitl/netclient
ref: release-${{ inputs.version }}
- name: setup ssh
run: |
mkdir -p ~/.ssh/
echo "$SSH_KEY" > ~/.ssh/id_devops
chmod 600 ~/.ssh/id_devops
cat >>~/.ssh/config <<END
Host *.clustercat.com
User root
IdentityFile ~/.ssh/id_devops
StrictHostKeyChecking no
END
env:
SSH_KEY: ${{ secrets.TESTING_SSH_KEY }}
- name: copy files
run: |
ssh fileserver.clustercat.com "mkdir -p /var/www/files/releases/download/${{ inputs.version }}"
ssh fileserver.clustercat.com "cd /var/www/files/releases/download/${{ inputs.version }};gh release download -R gravitl/netclient ${{ inputs.version }}
ssh fileserver.clustercat.com "cd /var/www/api/; wget https://raw.githubusercontent.com/gravitl/netmaker/${{ inputs.version }}/swagger.yml