Files
breeze/.github/workflows/fdroid.yml
T

75 lines
2.4 KiB
YAML

name: F-Droid
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '23 7 * * *'
workflow_dispatch:
inputs:
revision:
description: Exact committed candidate (defaults to the triggering commit)
required: false
type: string
workflow_call:
inputs:
revision:
required: false
type: string
permissions:
contents: read
jobs:
build:
name: F-Droid security and clean build
runs-on: ubuntu-latest
timeout-minutes: 90
container:
# Official F-Droid buildserver, pinned for repeatable verification.
image: registry.gitlab.com/fdroid/fdroidserver@sha256:1ea8bef1820bff06c2974e31b4fc4c79c364cd24231b86e71fa4b926797e0dac
steps:
- name: Require an immutable candidate
env:
CANDIDATE: ${{ inputs.revision || github.sha }}
shell: bash
run: |
if ! [[ "$CANDIDATE" =~ ^[0-9a-f]{40}$ ]]; then
echo "::error::revision must be a full commit ID, never a branch or tag"
exit 1
fi
# Checkout's LFS support requires git-lfs inside the job container.
- name: Install recipe dependencies
run: |
apt-get update
apt-get install -y --no-install-recommends build-essential jimsh libssl-dev python3-fonttools openjdk-21-jdk-headless fdroidserver git-lfs
update-alternatives --set java /usr/lib/jvm/java-21-openjdk-amd64/bin/java
sdkmanager 'platforms;android-36' 'build-tools;34.0.0' 'ndk;28.2.13676358' 'cmake;3.22.1'
- name: Checkout candidate
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
ref: ${{ inputs.revision || github.sha }}
path: build/xyz.waozi.inbe
lfs: true
persist-credentials: false
- name: Build and scan with F-Droid without cached package sources
run: python3 build/xyz.waozi.inbe/scripts/check-fdroid.py
- name: Preserve APK, exact metadata and scanner evidence
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: fdroid-unsigned
path: |
tmp/*.apk
logs/
metadata/
build/xyz.waozi.inbe/build/outputs/logs/
if-no-files-found: error
retention-days: 7