Check locales daily #171
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 locales daily | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
check-locales: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Set up Python | |
uses: actions/[email protected] | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r android-l10n-integrity/requirements.txt | |
- name: Run dir_extract.py | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
python android-l10n-integrity/src/dir_extract.py $GITHUB_TOKEN | |
- name: Run apk_download.py | |
run: | | |
python android-l10n-integrity/src/apk_download.py ./app.apk | |
- name: Run apk_inspect.py | |
run: | | |
python android-l10n-integrity/src/apk_inspect.py ./app.apk | |
- name: Run locale_compare.py | |
run: | | |
python android-l10n-integrity/src/locale_compare.py | |
- name: Upload result | |
if: failure() | |
uses: actions/[email protected] | |
with: | |
name: check-locales-log | |
path: ./check_locales.log | |
- name: Send Slack notice | |
if: failure() | |
uses: slackapi/[email protected] | |
with: | |
channel-id: C028QK733QR | |
payload-file-path: ./android-l10n-integrity/src/slack_payload.json | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | |
run_id: ${{ github.run_id }} | |
repository: ${{ github.repository }} | |
server_url: ${{ github.server_url }} | |
LOCALES_MISSING: ${{ env.LOCALES_MISSING }} | |