image: jangrewe/gitlab-ci-android stages: - build - deploy before_script: - export GRADLE_USER_HOME=$(pwd)/.gradle - chmod +x ./gradlew cache: key: ${CI_PROJECT_ID} paths: - .gradle/ build: stage: build script: - mkdir -p .android && touch .android/repositories.cfg - ./gradlew assembleDebug artifacts: paths: - app/build/outputs/apk/debug/app-debug.apk deploy-develop: stage: deploy only: - develop script: - eval `ssh-agent -s` - ssh-add <(echo "$SSH_PRIVATE_KEY") - scp -o StrictHostKeyChecking=no app/build/outputs/apk/debug/app-debug.apk fdroid@apps.funkwhale.audio:/srv/fdroid/fdroid/develop/repo/org.funkwhale.ffa.dev-$CI_COMMIT_SHORT_SHA.apk - ssh -o StrictHostKeyChecking=no fdroid@apps.funkwhale.audio 'docker run --rm -u $(id -u):$(id -g) -v /srv/fdroid/fdroid/develop:/repo registry.gitlab.com/fdroid/docker-executable-fdroidserver:master update' tags: - shell