Trigger Didomi SDK Update #112
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
# .github/workflows/scheduled-update.yml | |
name: Trigger Didomi SDK Update | |
on: | |
schedule: | |
# Runs "At 00:00 on Sunday" (see https://crontab.guru) | |
- cron: '0 0 * * SUN' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
check: | |
name: Check Didomi SDK version | |
runs-on: ubuntu-latest | |
outputs: | |
continue: ${{ steps.check.outputs.continue }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check Didomi SDK version | |
id: check | |
run: echo "continue=$(bash .github/scripts/check_didomi_sdk.sh)" >> $GITHUB_OUTPUT | |
build: | |
name: Update & Build Didomi SDK | |
needs: [check] | |
if: ${{ needs.check.outputs.continue == 'yes' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | |
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
- name: Set up our JDK environment | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Update Didomi SDK | |
run: bash .github/scripts/update_didomi_sdk.sh | |
- name: Assemble with new dependency | |
run: ./gradlew assemble --no-daemon | |
- name: Commit & Push changes | |
uses: actions-js/push@master | |
with: | |
author_email: "[email protected]" | |
author_name: "Nicolas CHAIX" | |
branch: ${{ github.ref }} | |
github_token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | |
message: "Update Didomi SDK dependency" |