Dependency #47
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: Dependency | |
on: | |
schedule: | |
- cron: "0 7 * * 6" | |
jobs: | |
DependencyCheck: | |
runs-on: ubuntu-latest | |
outputs: | |
status: ${{ steps.status.outputs.status }} | |
steps: | |
- name: Clone Repo | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 0 | |
- name: Adding secret files | |
run: | | |
mkdir android/src/release | |
echo "${{ secrets.RELEASE_GOOGLE_SERVICES_JSON_ASC }}" > google-services.json.asc | |
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch google-services.json.asc > android/src/release/google-services.json | |
mkdir android/src/debug | |
echo "${{ secrets.DEBUG_GOOGLE_SERVICES_JSON_ASC }}" > google-services.json.asc | |
gpg -d --passphrase "${{ secrets.SECRET_PASSWORD }}" --batch google-services.json.asc > android/src/debug/google-services.json | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: 'temurin' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Run dependencyUpdates task | |
run: ./gradlew dependencyUpdates --parallel | |
- name: Set Job Summary | |
run: | | |
echo "<details>" >> $GITHUB_STEP_SUMMARY | |
echo "<summary>Gradle Dependencies</summary>" >> $GITHUB_STEP_SUMMARY | |
echo "<br>" >> $GITHUB_STEP_SUMMARY | |
echo "```" >> $GITHUB_STEP_SUMMARY | |
echo `$(cat build/dependencyUpdates/report.txt)` >> $GITHUB_STEP_SUMMARY | |
echo "```" >> $GITHUB_STEP_SUMMARY | |
echo "</details>" >> $GITHUB_STEP_SUMMARY | |
echo "" >> $GITHUB_STEP_SUMMARY | |
- name: Set Job Status | |
id: status | |
run: echo "::set-output name=status::success" | |
Notify: | |
runs-on: ubuntu-latest | |
needs: DependencyCheck | |
if: always() | |
steps: | |
- name: Notify slack success | |
if: needs.DependencyCheck.outputs.status == 'success' | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
uses: voxmedia/github-action-slack-notify-build@v2 | |
with: | |
channel: ccc-github | |
status: SUCCESS | |
color: good | |
- name: Notify slack fail | |
if: false == (needs.DependencyCheck.outputs.status == 'success') | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
uses: voxmedia/github-action-slack-notify-build@v2 | |
with: | |
channel: ccc-github | |
status: FAILED | |
color: danger |