Commit 89bdbcc 1 parent ecb856a commit 89bdbcc Copy full SHA for 89bdbcc
File tree 4 files changed +91
-0
lines changed
4 files changed +91
-0
lines changed Original file line number Diff line number Diff line change
1
+ Dockerfile.android
2
+ app.apk
3
+ .direnv /
4
+ .github /
5
+ .secrets
6
+ app.tar.xz
7
+ flake.nix
8
+ flake.lock
Original file line number Diff line number Diff line change
1
+ name : Build Android Docker Image and Upload Artifacts
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - name : Checkout repository
14
+ uses : actions/checkout@v4
15
+
16
+ - name : Set up Depot CLI
17
+ uses : depot/setup-action@v1
18
+
19
+ - run : depot build --project 0k8767spqx --load --tag build -f Dockerfile .
20
+ env :
21
+ DEPOT_TOKEN : ${{ secrets.DEPOT_TOKEN }}
22
+
23
+ - name : Create artifact directory
24
+ run : mkdir -p artifacts
25
+
26
+ - name : Copy artifacts from container
27
+ run : docker export $(docker create build:latest --name extract) | tar -xf - out
28
+
29
+ - name : Upload android build artifact
30
+ uses : actions/upload-artifact@v4
31
+ with :
32
+ name : apk
33
+ path : out/app.apk
34
+
35
+ - name : Upload linux build artifact
36
+ uses : actions/upload-artifact@v4
37
+ with :
38
+ name : linux
39
+ path : out/app_linux.tar.xz
Original file line number Diff line number Diff line change
1
+ FROM golang:bookworm AS builder-android
2
+ WORKDIR /build
3
+
4
+ RUN apt update
5
+ RUN apt-get install curl unzip -y
6
+
7
+ RUN curl -LO https://dl.google.com/android/repository/android-ndk-r27b-linux.zip && unzip android-ndk-r27b-linux.zip
8
+ ENV ANDROID_NDK_HOME=/build/android-ndk-r27b/
9
+
10
+ RUN apt-get install golang gcc gcc-mingw-w64 -y
11
+ RUN go install fyne.io/fyne/v2/cmd/fyne@latest
12
+
13
+ COPY go.mod go.sum main.go Icon.png .
14
+ COPY helper ./helper
15
+ COPY pages ./pages
16
+ COPY preferences ./preferences
17
+ COPY resources ./resources
18
+ COPY state ./state
19
+
20
+ RUN fyne package --target android -appID io.bbfs.app -icon Icon.png --release
21
+
22
+
23
+
24
+ FROM golang:alpine AS builder-linux
25
+ WORKDIR /build
26
+
27
+ RUN apk add go gcc libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev linux-headers mesa-dev xz
28
+ RUN go install fyne.io/fyne/v2/cmd/fyne@latest
29
+
30
+ COPY go.mod go.sum main.go Icon.png .
31
+ COPY helper ./helper
32
+ COPY pages ./pages
33
+ COPY preferences ./preferences
34
+ COPY resources ./resources
35
+ COPY state ./state
36
+
37
+ RUN fyne package --target linux -appID io.bbfs.app -icon Icon.png --release && mv app.tar.xz app_linux.tar.xz
38
+
39
+
40
+ FROM scratch
41
+ WORKDIR /out
42
+ COPY --from=builder-android /build/app.apk .
43
+ COPY --from=builder-linux /build/app_linux.tar.xz .
Original file line number Diff line number Diff line change
1
+ {"id" :" 0k8767spqx" }
You can’t perform that action at this time.
0 commit comments