Add screenshot update task #1
This file contains 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: Update screenshot | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
updateScreenshot: | ||
runs-on: macos-latest | ||
env: | ||
CCDROIDX_RELEASE_KEYSTORE_PASSWORD: ${{ secrets.CCDROIDX_RELEASE_KEYSTORE_PASSWORD }} | ||
CCDROIDX_RELEASE_KEY_ALIAS: ${{ secrets.CCDROIDX_RELEASE_KEY_ALIAS }} | ||
CCDROIDX_RELEASE_KEY_ALIAS_PASSWORD: ${{ secrets.CCDROIDX_RELEASE_KEY_ALIAS_PASSWORD }} | ||
CCDROIDX_RELEASE_KEYSTORE_PATH: release.keystore | ||
GOOGLE_SERVICE_JSON: ${{ secrets.GOOGLE_SERVICE_JSON }} | ||
timeout-minutes: 90 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: Stub release keystore file | ||
run: | | ||
touch release.keystore | ||
- name: Decrypt google service json | ||
run: | | ||
TMP_GOOGLE_SERVICE_JSON_DIR="${RUNNER_TEMP}"/play | ||
mkdir "${TMP_GOOGLE_SERVICE_JSON_DIR}" | ||
echo $GOOGLE_SERVICE_JSON | base64 -D > "${TMP_GOOGLE_SERVICE_JSON_DIR}"/google-services.json | ||
mv "${TMP_GOOGLE_SERVICE_JSON_DIR}"/google-services.json app/google-services.json | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
- name: Accept Android licenses | ||
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true | ||
- name: Set up Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
- name: Record Screenshot | ||
run: ./gradlew app:verifyAndRecordRoborazziFlossDebug | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
commit-message: Updating Failing Screenshots | ||
branch: update-screenshot | ||
branch-suffix : short-commit-hash | ||
title: [Update Screenshot] Automated PR to update screenshot | ||
body: Automated task to update image references for screenshot testing | ||
labels: automated pr | ||
reviewers: vincent-paing |