-
Notifications
You must be signed in to change notification settings - Fork 28
101 lines (90 loc) · 3.18 KB
/
deploy.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Build and and deploy DSF packages
on:
workflow_dispatch:
inputs:
target:
description: "Deployment target"
required: true
default: "dev"
type: choice
options:
- dev
- unstable-3.5
- stable-3.5
jobs:
build:
runs-on: ubuntu-22.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Install NodeJS environment
- name: Set up NodeJS
uses: actions/setup-node@v3
with:
node-version: 16
# Install .NET environment
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6
# Install required tools
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y dpkg-sig libxml2-utils
# Import GPG key for package signing
- name: Configure GPG key
run: |
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
# Build DSF
- name: Build DSF packages
run: |
cd pkg
./build.sh --signing-key=C406404B2459FE0B1C6CC19D3738126EDA91C86B --target-arch=armhf --dest-dir=./out
./build.sh --signing-key=C406404B2459FE0B1C6CC19D3738126EDA91C86B --target-arch=arm64 --dest-dir=./out
# Upload armhf packages to pkg.duet3d.com
- name: Upload package files
uses: Creepios/[email protected]
with:
host: pkg.duet3d.com
port: 22
username: ${{ secrets.PKG_SSH_USER }}
password: ${{ secrets.PKG_SSH_PASS }}
privateKey: ${{ secrets.PKG_SSH_KEY }}
localPath: ./pkg/out
remotePath: /var/www/pkg/dists/${{ inputs.target }}/armv7
# Upload armhf packages to pkg.duet3d.com (main stable feed)
- name: Upload package files to the main stable feed
if: startsWith(inputs.target, 'stable')
uses: Creepios/[email protected]
with:
host: pkg.duet3d.com
port: 22
username: ${{ secrets.PKG_SSH_USER }}
password: ${{ secrets.PKG_SSH_PASS }}
privateKey: ${{ secrets.PKG_SSH_KEY }}
localPath: ./pkg/out
remotePath: /var/www/pkg/dists/stable/armv7
# Upload armhf packages to pkg.duet3d.com (main unstable feed)
- name: Upload package files to the main unstable feed
if: startsWith(inputs.target, 'unstable')
uses: Creepios/[email protected]
with:
host: pkg.duet3d.com
port: 22
username: ${{ secrets.PKG_SSH_USER }}
password: ${{ secrets.PKG_SSH_PASS }}
privateKey: ${{ secrets.PKG_SSH_KEY }}
localPath: ./pkg/out
remotePath: /var/www/pkg/dists/unstable/armv7
# Refresh package lists if the dev target is selected
- name: Refresh package lists
if: inputs.target == 'dev'
uses: appleboy/[email protected]
with:
host: pkg.duet3d.com
username: ${{ secrets.PKG_SSH_USER }}
key: ${{ secrets.PKG_SSH_KEY }}
script: update-pkg-feed dev