data-update.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. name: "Update searx.data"
  2. on:
  3. schedule:
  4. - cron: "05 06 1 * *"
  5. workflow_dispatch:
  6. jobs:
  7. updateData:
  8. name: Update data - ${{ matrix.fetch }}
  9. runs-on: ubuntu-20.04
  10. if: ${{ github.repository_owner == 'searxng'}}
  11. strategy:
  12. fail-fast: false
  13. matrix:
  14. fetch:
  15. - update_ahmia_blacklist.py
  16. - update_currencies.py
  17. - update_external_bangs.py
  18. - update_firefox_version.py
  19. - update_languages.py
  20. - update_wikidata_units.py
  21. steps:
  22. - name: Checkout
  23. uses: actions/checkout@v2
  24. - name: Install Ubuntu packages
  25. run: |
  26. sudo ./utils/searx.sh install packages
  27. - name: Set up Python
  28. uses: actions/setup-python@v2
  29. with:
  30. python-version: '3.9'
  31. architecture: 'x64'
  32. - name: Install Python dependencies
  33. run: |
  34. make V=1 install
  35. - name: Fetch data
  36. env:
  37. FETCH_SCRIPT: ./searx_extra/update/${{ matrix.fetch }}
  38. run: |
  39. V=1 ./manage pyenv.cmd python "$FETCH_SCRIPT"
  40. - name: Create Pull Request
  41. id: cpr
  42. uses: peter-evans/create-pull-request@v3
  43. with:
  44. commit-message: Update searx.data - ${{ matrix.fetch }}
  45. committer: searxng-bot <noreply@github.com>
  46. author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
  47. signoff: false
  48. branch: update_data_${{ matrix.fetch }}
  49. delete-branch: true
  50. draft: false
  51. title: 'Update searx.data - ${{ matrix.fetch }}'
  52. body: |
  53. Update searx.data - ${{ matrix.fetch }}
  54. labels: |
  55. data
  56. - name: Check outputs
  57. run: |
  58. echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
  59. echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"