Skip to content

add repo update ci

add repo update ci #1

Workflow file for this run

name: Fdroid Repo Update
on:
push:
branches:
- fdroid-repo
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the main branch
- name: Checkout Main Branch
uses: actions/checkout@v2
with:
fetch-depth: 0
# Step 2: Setup Java with version 17.x
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: "17.x"
# Step 3: Setup F-Droid (install fdroidserver) and update the repo
- name: Fdroid Install
uses: subosito/flutter-action@v1
- name: Run F-Droid Update
env:
FDROID_CONFIG_YML_B64: ${{ secrets.FDROID_CONFIG_YML }}
FDROID_KEYSTORE_P12_B64: ${{ secrets.FDROID_KEYSTORE_P12 }}
run: |
# Decode the secrets into files
echo $FDROID_CONFIG_YML_B64 | base64 --decode > config.yml
echo $FDROID_KEYSTORE_P12_B64 | base64 --decode > keystore.p12
# Install fdroidserver
sudo apt-get update
sudo apt-get install -y fdroidserver
# Run the update command, referencing the files
fdroid update -c
# Step 4: Push the updated repo files with amended commit
- name: Push F-Droid updates
run: |
git add .
git commit --amend -m "chore:${{ github.run_number }} update F-Droid metadata"
git push origin fdroid-repo --force