Compare commits
2 Commits
master
...
v2.4.2-tes
Author | SHA1 | Date | |
---|---|---|---|
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 }}
|
22
Dockerfile
22
Dockerfile
@ -1,19 +1,23 @@
|
|||||||
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
|
||||||
|
|
||||||
@ -73,4 +77,4 @@ RUN mkdir -p /var/www/fdroid
|
|||||||
RUN addgroup -S fdroid && adduser -D -h /fdroid -s /bin/bash -G fdroid fdroid
|
RUN addgroup -S fdroid && adduser -D -h /fdroid -s /bin/bash -G fdroid fdroid
|
||||||
RUN chown -R fdroid: /fdroid /var/www/fdroid
|
RUN chown -R fdroid: /fdroid /var/www/fdroid
|
||||||
|
|
||||||
CMD /usr/local/bin/docker-entrypoint.sh
|
CMD /usr/local/bin/docker-entrypoint.sh
|
||||||
|
@ -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