-
-
Notifications
You must be signed in to change notification settings - Fork 54
39 lines (35 loc) · 1.15 KB
/
build-arm.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
name: Build for ARMv6 (32-bit)
on: [push]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set env
run: if grep -Fxq "devel" cmd/go2tv/version.txt;then echo "GO2TV_VERSION=$(cat cmd/go2tv/version.txt)";else echo "GO2TV_VERSION=v$(cat cmd/go2tv/version.txt)";fi >> $GITHUB_ENV
- uses: pguyot/arm-runner-action@v2
id: main_image
with:
copy_repository_path: /go2tv_dir
copy_artifact_path: go2tv
image_additional_mb: 800
base_image: raspios_lite:latest
commands: |
cd /
sudo apt update
sudo apt install -y xorg-dev
sudo apt clean
wget -nv https://go.dev/dl/go1.23.4.linux-armv6l.tar.gz
tar -xzf go1.23.4.linux-armv6l.tar.gz
rm go1.23.4.linux-armv6l.tar.gz
export GOROOT=/go
cd /go2tv_dir
/go/bin/go build -ldflags "-s -w" -o go2tv cmd/go2tv/go2tv.go
- uses: actions/upload-artifact@v4
with:
name: go2tv_${{ env.GO2TV_VERSION }}_linux_arm
path: |
LICENSE
README.md
go2tv
retention-days: 2