From a14e5a99d98cf4b368895466e214ff5b45614ae7 Mon Sep 17 00:00:00 2001 From: jobobby04 Date: Sun, 10 May 2020 00:29:43 -0400 Subject: [PATCH] Setup first full beta test --- .github/workflows/android-debug.yml | 67 +++++++++-------------------- 1 file changed, 21 insertions(+), 46 deletions(-) diff --git a/.github/workflows/android-debug.yml b/.github/workflows/android-debug.yml index 5d48558c4..e7e4bdd54 100644 --- a/.github/workflows/android-debug.yml +++ b/.github/workflows/android-debug.yml @@ -1,50 +1,25 @@ -name: Android Master CI - +name: Remote Dispatch Action Initiator + on: push: - branches: - - 'master' - + repository_dispatch: + jobs: - - apk: - name: Generate APK - runs-on: ubuntu-18.04 - + ping-pong: + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: Get NDK - run: sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;20.0.5594570" - - name: Write google-services.json - uses: DamianReeves/write-file-action@v1.0 - with: - # The path to the file to write - path: app/google-services.json - # The contents of the file - contents: ${{ secrets.GOOGLE_SERVICES_TEXT }} - # The mode of writing to use: `overwrite`, `append`, or `preserve`. - write-mode: overwrite # optional, default is preserve - - name: Build Release APK - run: bash ./gradlew assembleRelease --stacktrace - - name: Sign Android release - uses: r0adkll/sign-android-release@v1 - with: - # The directory to find your release to sign - releaseDirectory: app/build/outputs/apk/standard/release - # The key used to sign your release in base64 encoded format - signingKeyBase64: ${{ secrets.SIGNING_KEY }} - # The key alias - alias: ${{ secrets.ALIAS }} - # The password to the keystore - keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} - # The password for the key - keyPassword: ${{ secrets.KEY_PASSWORD }} - - name: Upload APK - uses: actions/upload-artifact@v2 - with: - name: TachiyomiSY-${{ github.sha }} - path: ${{ env.SIGNED_RELEASE_FILE }} + - name: PING - Dispatch initiating repository event + if: github.event.action != 'pong' + run: | + curl -X POST https://api.github.com/repos/jobobby04/TachiyomiSYPrieview/dispatches \ + -H 'Accept: application/vnd.github.everest-preview+json' \ + -u ${{ secrets.ACCESS_TOKEN }} \ + --data '{"event_type": "ping", "client_payload": { "repository": "'"$GITHUB_REPOSITORY"'" }}' + - name: ACK - Acknowledge pong from remote repository + if: github.event.action == 'pong' + run: | + echo "PONG received from '${{ github.event.client_payload.repository }}'" && \ + curl -X POST https://api.github.com/repos/jobobby04/TachiyomiSYPrieview/dispatches \ + -H 'Accept: application/vnd.github.everest-preview+json' \ + -u ${{ secrets.ACCESS_TOKEN }} \ + --data '{"event_type": "ack", "client_payload": { "repository": "'"$GITHUB_REPOSITORY"'" }}'