Skip to content

Commit 1d9bc9d

Browse files
authored
Merge pull request #3 from 3015RangerRobotics/build-image
add workflow that maybe builds an image
2 parents 18ff8fc + 3335d4e commit 1d9bc9d

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed

.github/wokflows/build_image.yaml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build image
2+
on:
3+
push:
4+
branches: [main]
5+
6+
pull_request:
7+
branches: [main]
8+
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
name: "Build Orange Pi 5"
15+
steps:
16+
- name: Checkout repo
17+
uses: actions/checkout@v3
18+
19+
- uses: pguyot/arm-runner-action@HEAD
20+
id: install_deps
21+
with:
22+
image_additional_mb: 1500
23+
bind_mount_repository: true
24+
base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v1.30/ubuntu-22.04.3-preinstalled-server-arm64-orangepi-5.img.xz
25+
commands: |
26+
git clone https://github.com/3015RangerRobotics/polaris.git /opt/polaris
27+
cd /opt/polaris
28+
chmod +x setup.sh
29+
./setup.sh
30+
31+
- name: Compress built image
32+
run: |
33+
mv ${{ steps.install_deps.outputs.image }} polaris_opi5.img
34+
sudo xz -T 0 -v polaris_opi5.img
35+
36+
- uses: actions/upload-artifact@v4
37+
with:
38+
name: polaris_opi5.img.xz
39+
path: polaris_opi5.img.xz
40+
if-no-files-found: error

polaris.service

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
Description=Service that runs Polaris
33

44
[Service]
5-
WorkingDirectory=/home/orangepi/polaris
5+
WorkingDirectory=/opt/polaris
66
# Run polaris at "nice" -10, which is higher priority than standard
77
Nice=-10
8-
ExecStart=/usr/bin/python3 /home/orangepi/polaris/polaris.py
8+
ExecStart=/usr/bin/python3 /opt/polaris/polaris.py
99
ExecStop=/bin/systemctl kill polaris
1010
Type=simple
1111
Restart=on-failure

0 commit comments

Comments
 (0)