name: Build and Sync with Upstream on: push: branches: - main schedule: # Run everyday at midnight to sync with upstream - cron: '0 0 * * *' jobs: build: name: Build APK runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Java uses: actions/setup-java@v3 with: java-version: '17' distribution: 'temurin' - name: Setup Gradle uses: gradle/gradle-build-action@v2 - name: Sync with Upstream (if scheduled) if: github.event_name == 'schedule' run: | git remote add upstream https://github.com/octoshrimpy/quik.git || true git fetch upstream git config --global user.name "Gitea Actions" git config --global user.email "actions@gitea.local" git merge upstream/main --allow-unrelated-histories -m "Auto-merge upstream changes" || echo "Merge conflicts must be resolved manually" - name: Build Debug APK run: ./gradlew assembleDebug - name: Upload Artifact uses: actions/upload-artifact@v3 with: name: quik-matrix-sync-debug.apk path: presentation/build/outputs/apk/debug/presentation-debug.apk