Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
40902f8729 | |||
3c86622b50 | |||
013363000c |
52
.gitea/workflows/build.yaml
Normal file
52
.gitea/workflows/build.yaml
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
name: Build and Push Image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
env:
|
||||||
|
REGISTRY: reg.cadoles.com
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build and push image
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Login to Docker Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Docker meta base
|
||||||
|
id: metabase
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
reg.cadoles.com/cadoles/fdroid-repo
|
||||||
|
flavor: |
|
||||||
|
latest=auto
|
||||||
|
tags: |
|
||||||
|
type=schedule
|
||||||
|
type=ref,event=branch
|
||||||
|
type=ref,event=pr
|
||||||
|
type=ref,event=tag
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
type=semver,pattern={{major}}
|
||||||
|
type=sha,prefix=,suffix=
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
tags: ${{ steps.metabase.outputs.tags }}
|
||||||
|
labels: ${{ steps.metabase.outputs.labels }}
|
26
Dockerfile
26
Dockerfile
@ -1,22 +1,28 @@
|
|||||||
FROM reg.cadoles.com/proxy_cache/library/alpine:3.19 as build
|
FROM reg.cadoles.com/proxy_cache/library/alpine:3.22 as build
|
||||||
|
|
||||||
ARG FDROIDSERVER_VERSION=2.2
|
ARG FDROIDSERVER_VERSION=2.4.2
|
||||||
|
ARG ANDROGUARD_VERSION=4.1.3
|
||||||
|
ARG FRIDA_TOOLS_VERSION=14.3.1
|
||||||
ARG CRYPTOGRAPHY_DONT_BUILD_RUST=1
|
ARG CRYPTOGRAPHY_DONT_BUILD_RUST=1
|
||||||
|
|
||||||
|
ENV PIPX_HOME=/fdroid/
|
||||||
|
ENV PIPX_BIN_DIR=/fdroid/bin
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
python3 py3-pip build-base freetype-dev libffi-dev \
|
python3 py3-pip build-base freetype-dev libffi-dev \
|
||||||
libpng-dev py3-setuptools python3-dev libxml2-dev \
|
libpng-dev py3-setuptools python3-dev libxml2-dev \
|
||||||
libxslt-dev openssl-dev jpeg-dev py3-qt5
|
libxslt-dev openssl-dev jpeg-dev py3-qt5 go nodejs npm git pipx
|
||||||
|
|
||||||
RUN python3 -m venv --system-site-packages /fdroid
|
RUN python3 -m venv --system-site-packages /fdroid \
|
||||||
|
&& source /fdroid/bin/activate
|
||||||
|
RUN pipx install androguard==${ANDROGUARD_VERSION} frida-tools==${FRIDA_TOOLS_VERSION} fdroidserver==${FDROIDSERVER_VERSION}
|
||||||
|
|
||||||
RUN . /fdroid/bin/activate \
|
FROM reg.cadoles.com/proxy_cache/library/alpine:3.22 as runtime
|
||||||
&& pip3 install --no-cache-dir androguard==3.3.5 frida-tools==10.8.0 fdroidserver==${FDROIDSERVER_VERSION}
|
|
||||||
|
|
||||||
FROM reg.cadoles.com/proxy_cache/library/alpine:3.19 as runtime
|
|
||||||
|
|
||||||
ARG TIMEZONE=Europe/Paris
|
ARG TIMEZONE=Europe/Paris
|
||||||
|
|
||||||
|
RUN apk update && apk upgrade
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
python3 openjdk8 java-common \
|
python3 openjdk8 java-common \
|
||||||
bash supervisor openssh inotify-tools gettext \
|
bash supervisor openssh inotify-tools gettext \
|
||||||
@ -32,8 +38,8 @@ RUN mkdir -p /opt/android \
|
|||||||
ENV ANDROID_HOME="/opt/android"
|
ENV ANDROID_HOME="/opt/android"
|
||||||
ENV PATH="$PATH:$ANDROID_HOME/tools/bin"
|
ENV PATH="$PATH:$ANDROID_HOME/tools/bin"
|
||||||
|
|
||||||
RUN yes | sdkmanager "build-tools;34.0.0"
|
RUN yes | sdkmanager "build-tools;36.0.0"
|
||||||
ENV PATH="$PATH:$ANDROID_HOME/build-tools/34.0.0"
|
ENV PATH="$PATH:$ANDROID_HOME/build-tools/36.0.0"
|
||||||
|
|
||||||
COPY --from=build /fdroid /fdroid
|
COPY --from=build /fdroid /fdroid
|
||||||
|
|
||||||
|
2
Makefile
2
Makefile
@ -27,6 +27,8 @@ run:
|
|||||||
-e "FDROID_KEYSTORE_DNAME=CN=cadoles.com, OU=ID, O=Cadoles, L=Dijon, S=France, C=FR" \
|
-e "FDROID_KEYSTORE_DNAME=CN=cadoles.com, OU=ID, O=Cadoles, L=Dijon, S=France, C=FR" \
|
||||||
fdroid-repository:latest \
|
fdroid-repository:latest \
|
||||||
$(DOCKER_CMD)
|
$(DOCKER_CMD)
|
||||||
|
scan:
|
||||||
|
trivy image --format table fdroid-repository:latest
|
||||||
|
|
||||||
release:
|
release:
|
||||||
docker image tag fdroid-repository:latest reg.cadoles.com/cadoles/fdroid-repository:latest
|
docker image tag fdroid-repository:latest reg.cadoles.com/cadoles/fdroid-repository:latest
|
||||||
|
@ -7,7 +7,7 @@ DIR=$2
|
|||||||
FILE=$3
|
FILE=$3
|
||||||
|
|
||||||
if [ -z "$FILE" ] || [[ "$FILE" == *.apk ]] || [[ "$FILE" == *.yml ]]; then
|
if [ -z "$FILE" ] || [[ "$FILE" == *.apk ]] || [[ "$FILE" == *.yml ]]; then
|
||||||
. /fdroid/bin/activate && fdroid update --clean -c --rename-apks --use-date-from-apk --delete-unknown
|
/fdroid/bin/fdroid update --clean -c --rename-apks --use-date-from-apk --delete-unknown
|
||||||
. /fdroid/bin/activate && fdroid deploy
|
/fdroid/bin/fdroid deploy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user