Check Dependency Updates #248
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: Check Dependency Updates | |
on: | |
schedule: | |
- cron: "37 13 * * SAT" | |
workflow_dispatch: | |
jobs: | |
dependency-updates: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'corretto' | |
java-version: '17' | |
- name: Enable KVM group permissions for emulator hardware acceleration | |
run: | | |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
sudo udevadm control --reload-rules | |
sudo udevadm trigger --name-match=kvm | |
- name: Check Dependency Updates | |
run: ./gradlew --no-configuration-cache dependencyUpdates | |
- name: Log dependency update report | |
run: cat build/dependencyUpdates/dependency_update_report.txt | |
- name: 💌 Send email report | |
uses: actions/github-script@v7 | |
env: | |
MAIL_USERNAME: ${{ secrets.MAIL_USERNAME }} | |
MAIL_PASSWORD: ${{ secrets.MAIL_PASSWORD }} | |
with: | |
script: | | |
const subject = `Dependency update report of Jetflix ¯\\_(ツ)_/¯` | |
const report = require('fs').readFileSync('build/dependencyUpdates/dependency_update_report.txt', 'utf8') | |
const mailSenderScriptPath = '/./.github/scripts/report-mail-sender.js' | |
const mailSenderScript = require(`${process.env.GITHUB_WORKSPACE}${mailSenderScriptPath}`) | |
mailSenderScript(subject, report) | |
- name: Share dependency update reports | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dependency-update-reports | |
path: build/dependencyUpdates |