actions-runner/.forgejo/workflows/fdroid-repo-build-deploy.yml

74 lines
2.7 KiB
YAML

on:
workflow_dispatch:
schedule:
- cron: '30 5 * * *' # 30 minutes after update check
jobs:
build:
runs-on: docker-gradle
container:
image: git.fucktheforce.de/thedevstack/fdroid-build-container/fdroidserver:2.4.2
steps:
- name: accept licenses
run: |
set +o pipefail
yes | sdkmanager --licenses > /dev/null
- name: install ssh key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY_THEDEVSTACK_DE_REPO }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -p 22 -H ispc.huaraka.de > ~/.ssh/known_hosts
- name: checkout fdroid configuration
uses: https://git.fucktheforce.de/actions/checkout@v4
with:
repository: thedevstack/fdroid-conf
ref: master
token: "${{ secrets.THEDEVSTACK_BOT_ACCESS_TOKEN_REPO }}"
path: fdroid-conf
- name: checkout fdroid private stuff
uses: https://git.fucktheforce.de/actions/checkout@v4
with:
repository: thedevstack/int-priv
ref: master
token: "${{ secrets.THEDEVSTACK_BOT_ACCESS_TOKEN_REPO }}"
path: int-priv
- name: sync fdroid archive
run: rsync -avP thedevstack_de_repo@ispc.huaraka.de:/var/www/thedevstack.de/f-droid/fdroid/archive .
working-directory: fdroid-conf
- name: sync fdroid repo
run: rsync -avP thedevstack_de_repo@ispc.huaraka.de:/var/www/thedevstack.de/f-droid/fdroid/repo .
working-directory: fdroid-conf
- name: fdroid scanner
run: |
# todo: only for enabled apps
grep CurrentVersionCode metadata/*.yml | sed -r 's#^metadata/(.*)\.yml:CurrentVersionCode: (.*)$#\1:\2#' | while read appid
do
fdroid scanner "$appid"
done
working-directory: fdroid-conf
- name: fdroid build all
run: fdroid build -a
working-directory: fdroid-conf
- name: fdroid publish
run: fdroid publish
working-directory: fdroid-conf
env:
keystorepass: ${{ secrets.FDROID_CONF_KEY_STORE_PASS }}
keypass: ${{ secrets.FDROID_CONF_KEY_PASS }}
- name: fdroid update
run: fdroid update
working-directory: fdroid-conf
env:
keystorepass: ${{ secrets.FDROID_CONF_KEY_STORE_PASS }}
keypass: ${{ secrets.FDROID_CONF_KEY_PASS }}
- name: fdroid signindex
run: fdroid signindex
working-directory: fdroid-conf
env:
keystorepass: ${{ secrets.FDROID_CONF_KEY_STORE_PASS }}
keypass: ${{ secrets.FDROID_CONF_KEY_PASS }}
- name: fdroid deploy
run: fdroid deploy
working-directory: fdroid-conf