cleanup #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Fdroid Repo Update | |
| on: | |
| push: | |
| branches: | |
| - fdroid-repo | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Step 1: Checkout the main branch | |
| - name: Checkout Fdroid-repo Branch | |
| uses: actions/checkout@v2 | |
| with: | |
| ref: fdroid-repo | |
| 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 config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add . | |
| git commit -m "chore:${{ github.run_number }} update F-Droid metadata" || echo "No changes to commit" | |
| git push origin fdroid-repo |