35 lines
1010 B
YAML
35 lines
1010 B
YAML
name: generate_databases
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
push:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
generate_databases:
|
|
if: github.ref == 'refs/heads/master'
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: Install dependencies
|
|
run: sudo apt update && sudo apt -y install python3-lxml
|
|
- name: Generate databases
|
|
run: ./scripts/generate_databases.py
|
|
- name: Commit changes
|
|
id: commit
|
|
run: |
|
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git config --local user.name "github-actions[bot]"
|
|
git add app/src/main/res/values/arrays.xml
|
|
if git commit -m "Regenerate databases list"; then
|
|
echo "push=true" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
- name: Push changes to repo
|
|
uses: ad-m/github-push-action@master
|
|
if: ${{ needs.commit.outputs.push == 'true' }}
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
branch: ${{ github.ref }}
|