forked from CasparCG/server
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.72 KB
/
linux.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Build Linux
on:
push:
# branches: [ "master" ]
pull_request:
branches: ["master"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run build
run: |
./tools/linux/ensure-base-images
./tools/linux/build-in-docker
./tools/linux/extract-from-docker
zip -r casparcg_server.zip casparcg_server/
env:
CI: 1
- name: Rename build
id: "rename-build"
shell: bash
run: |
# check if a release branch, or master, or a tag
if [[ "${{ github.ref_name }}" == "master" || "${{ github.ref_name }}" == "2.3.x-lts" ]]
then
# Only proceed if we have an sftp password
if [ -n "${{ secrets.SFTP_PASSWORD }}" ]
then
TARGET=casparcg-server-${{ github.sha }}-ubuntu20.zip
mv casparcg_server.zip "$TARGET"
echo "name=$TARGET" >> $GITHUB_OUTPUT
fi
fi
- name: Copy single file to remote
uses: garygrossgarten/github-action-scp@v0.8.0
if: ${{ steps.rename-build.outputs.name }}
with:
local: "${{ steps.rename-build.outputs.name }}"
remote: "${{ secrets.SFTP_ROOT }}/${{ github.ref_name }}/${{ steps.rename-build.outputs.name }}"
host: ${{ secrets.SFTP_HOST }}
username: ${{ secrets.SFTP_USERNAME }}
password: ${{ secrets.SFTP_PASSWORD }}