diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-01 14:14:58 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-03 10:14:17 +0100 |
commit | 51e9e152f7df003c65c16f822669a0674efcaf03 (patch) | |
tree | a18abdf95bfc449d8d08e4c47e8ccc7ee094bbf4 /.github/actions | |
parent | f3fbbf01402fc7491e044f160edca06ef793eb50 (diff) | |
download | PeerTube-51e9e152f7df003c65c16f822669a0674efcaf03.tar.gz PeerTube-51e9e152f7df003c65c16f822669a0674efcaf03.tar.zst PeerTube-51e9e152f7df003c65c16f822669a0674efcaf03.zip |
Build nightly using github action
Diffstat (limited to '.github/actions')
-rw-r--r-- | .github/actions/reusable-deploy/action.yml | 46 | ||||
-rw-r--r-- | .github/actions/reusable-prepare-peertube-build/action.yml | 31 | ||||
-rw-r--r-- | .github/actions/reusable-prepare-peertube-run/action.yml | 16 |
3 files changed, 93 insertions, 0 deletions
diff --git a/.github/actions/reusable-deploy/action.yml b/.github/actions/reusable-deploy/action.yml new file mode 100644 index 000000000..bc69a2e43 --- /dev/null +++ b/.github/actions/reusable-deploy/action.yml | |||
@@ -0,0 +1,46 @@ | |||
1 | name: "Reusable deploy on builds.joinpeertube.org" | ||
2 | |||
3 | description: "Reusable deploy on builds.joinpeertube.org" | ||
4 | |||
5 | inputs: | ||
6 | source: | ||
7 | required: true | ||
8 | description: "Source file/files/directory/directories to deploy" | ||
9 | destination: | ||
10 | required: true | ||
11 | description: "Destination directory on builds.joinpeertube.org" | ||
12 | knownHosts: | ||
13 | required: true | ||
14 | description: "Known hosts" | ||
15 | deployKey: | ||
16 | required: true | ||
17 | description: "Deploy key" | ||
18 | deployUser: | ||
19 | required: true | ||
20 | description: "Deploy user" | ||
21 | deployHost: | ||
22 | required: true | ||
23 | description: "Deploy host" | ||
24 | |||
25 | |||
26 | runs: | ||
27 | using: "composite" | ||
28 | |||
29 | steps: | ||
30 | - name: "Deploy" | ||
31 | shell: bash | ||
32 | run: | | ||
33 | mkdir -p ~/.ssh | ||
34 | chmod 700 ~/.ssh | ||
35 | |||
36 | echo "Adding ssh key to known hosts" | ||
37 | echo -e "${{ inputs.knownHosts }}" > ~/.ssh/known_hosts; | ||
38 | |||
39 | eval `ssh-agent -s` | ||
40 | |||
41 | echo "Adding ssh deploy key" | ||
42 | ssh-add <(echo "${{ inputs.deployKey }}"); | ||
43 | |||
44 | echo "Uploading files" | ||
45 | |||
46 | scp ${{ inputs.source }} ${{ inputs.deployUser }}@${{ inputs.deployHost }}:../../web/${{ inputs.destination }}; | ||
diff --git a/.github/actions/reusable-prepare-peertube-build/action.yml b/.github/actions/reusable-prepare-peertube-build/action.yml new file mode 100644 index 000000000..41ebf71c5 --- /dev/null +++ b/.github/actions/reusable-prepare-peertube-build/action.yml | |||
@@ -0,0 +1,31 @@ | |||
1 | name: "Reusable prepare PeerTube build" | ||
2 | |||
3 | description: "Reusable prepare PeerTube build" | ||
4 | |||
5 | inputs: | ||
6 | node-version: | ||
7 | required: true | ||
8 | description: 'NodeJS version' | ||
9 | |||
10 | runs: | ||
11 | using: "composite" | ||
12 | |||
13 | steps: | ||
14 | - name: Use Node.js | ||
15 | uses: actions/setup-node@v1 | ||
16 | with: | ||
17 | node-version: ${{ inputs.node-version }} | ||
18 | |||
19 | - name: Cache Node.js modules | ||
20 | uses: actions/cache@v2 | ||
21 | with: | ||
22 | path: | | ||
23 | **/node_modules | ||
24 | key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }} | ||
25 | restore-keys: | | ||
26 | ${{ runner.OS }}-node- | ||
27 | ${{ runner.OS }}- | ||
28 | |||
29 | - name: Install dependencies | ||
30 | shell: bash | ||
31 | run: yarn install --frozen-lockfile | ||
diff --git a/.github/actions/reusable-prepare-peertube-run/action.yml b/.github/actions/reusable-prepare-peertube-run/action.yml new file mode 100644 index 000000000..1a6cd2cfd --- /dev/null +++ b/.github/actions/reusable-prepare-peertube-run/action.yml | |||
@@ -0,0 +1,16 @@ | |||
1 | name: "Reusable prepare PeerTube run" | ||
2 | description: "Reusable prepare PeerTube run" | ||
3 | |||
4 | runs: | ||
5 | using: "composite" | ||
6 | |||
7 | steps: | ||
8 | - name: Setup system dependencies | ||
9 | shell: bash | ||
10 | run: | | ||
11 | sudo apt-get install postgresql-client-common redis-tools parallel | ||
12 | wget --quiet --no-check-certificate "https://download.cpy.re/ffmpeg/ffmpeg-release-4.3.1-64bit-static.tar.xz" | ||
13 | tar xf ffmpeg-release-4.3.1-64bit-static.tar.xz | ||
14 | mkdir -p $HOME/bin | ||
15 | cp ffmpeg-*/{ffmpeg,ffprobe} $HOME/bin | ||
16 | echo "$HOME/bin" >> $GITHUB_PATH | ||