Attempt auto readme generation #5
Workflow file for this run
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 README.md with generated image grids | |
on: | |
push: | |
branches: | |
- update-readme | |
jobs: | |
generate_image_grids: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
api-level: [ 29 ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: set up JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Install ADB | |
run: sudo apt-get install -y android-tools-adb | |
- name: Check for connected devices | |
run: | | |
devices=$(adb devices | grep -w "device" | wc -l) | |
if [ "$devices" -eq 0 ]; then | |
echo "No devices found." | |
exit 1 | |
else | |
echo "$devices device(s) found." | |
fi | |
- name: Run CaptureDialogSamples Test | |
run: ./gradlew connectedCheck -Pandroid.testInstrumentationRunnerArguments.class=com.mk.sheets.sample_images.CaptureDialogSamples | |
- name: Pull images from Emulator | |
run: | | |
adb pull /sdcard/Download/sheets ./docs/res/sheets | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install Pillow | |
run: pip install Pillow | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Generate image grid in README | |
run: | | |
python3 scripts/generate_image_grid.py | |
- name: Commit and Push Changes | |
run: | | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
git add README.md | |
git add docs/res/sheets | |
git add docs/README.md | |
git commit -m "Update README.md with generated image grids" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |