-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Dockerfile.android | ||
app.apk | ||
.direnv/ | ||
.github/ | ||
.secrets | ||
app.tar.xz | ||
flake.nix | ||
flake.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Build Android Docker Image and Upload Artifacts | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Depot CLI | ||
uses: depot/setup-action@v1 | ||
|
||
- run: depot build --project 0k8767spqx --load --tag build -f Dockerfile . | ||
env: | ||
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }} | ||
|
||
- name: Create artifact directory | ||
run: mkdir -p artifacts | ||
|
||
- name: Copy artifacts from container | ||
run: docker create build:latest --name extract && docker cp extract:/out . | ||
|
||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: output | ||
path: out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
FROM golang:bookworm AS builder-android | ||
WORKDIR /build | ||
|
||
RUN apt update | ||
RUN apt-get install curl unzip -y | ||
|
||
RUN curl -LO https://dl.google.com/android/repository/android-ndk-r27b-linux.zip && unzip android-ndk-r27b-linux.zip | ||
ENV ANDROID_NDK_HOME=/build/android-ndk-r27b/ | ||
|
||
RUN apt-get install golang gcc gcc-mingw-w64 -y | ||
RUN go install fyne.io/fyne/v2/cmd/fyne@latest | ||
|
||
COPY go.mod go.sum main.go Icon.png . | ||
COPY helper ./helper | ||
COPY pages ./pages | ||
COPY preferences ./preferences | ||
COPY resources ./resources | ||
COPY state ./state | ||
|
||
RUN fyne package --target android -appID io.bbfs.app -icon Icon.png --release | ||
|
||
|
||
|
||
FROM golang:alpine AS builder-linux | ||
WORKDIR /build | ||
|
||
RUN apk add go gcc libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev linux-headers mesa-dev xz | ||
RUN go install fyne.io/fyne/v2/cmd/fyne@latest | ||
|
||
COPY go.mod go.sum main.go Icon.png . | ||
COPY helper ./helper | ||
COPY pages ./pages | ||
COPY preferences ./preferences | ||
COPY resources ./resources | ||
COPY state ./state | ||
|
||
RUN fyne package --target linux -appID io.bbfs.app -icon Icon.png --release && mv app.tar.xz app_linux.tar.xz | ||
|
||
|
||
FROM scratch | ||
WORKDIR /out | ||
COPY --from=builder-android /build/app.apk . | ||
COPY --from=builder-linux /build/app_linux.tar.xz . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"id":"0k8767spqx"} |