data-update.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. name: "Update searx.data"
  2. on: # yamllint disable-line rule:truthy
  3. schedule:
  4. - cron: "59 23 28 * *"
  5. workflow_dispatch:
  6. jobs:
  7. updateData:
  8. name: Update data - ${{ matrix.fetch }}
  9. runs-on: ubuntu-24.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_engine_traits.py
  20. - update_wikidata_units.py
  21. - update_engine_descriptions.py
  22. steps:
  23. - name: Checkout
  24. uses: actions/checkout@v4
  25. - name: Install Ubuntu packages
  26. run: |
  27. sudo ./utils/searxng.sh install packages
  28. - name: Set up Python
  29. uses: actions/setup-python@v5
  30. with:
  31. python-version: '3.12'
  32. architecture: 'x64'
  33. - name: Install Python dependencies
  34. run: |
  35. make V=1 install
  36. - name: Fetch data
  37. env:
  38. FETCH_SCRIPT: ./searxng_extra/update/${{ matrix.fetch }}
  39. run: |
  40. V=1 ./manage pyenv.cmd python "$FETCH_SCRIPT"
  41. - name: Create Pull Request
  42. id: cpr
  43. uses: peter-evans/create-pull-request@v6
  44. with:
  45. commit-message: '[data] update searx.data - ${{ matrix.fetch }}'
  46. committer: searxng-bot <noreply@github.com>
  47. author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
  48. signoff: false
  49. branch: update_data_${{ matrix.fetch }}
  50. delete-branch: true
  51. draft: false
  52. title: '[data] update searx.data - ${{ matrix.fetch }}'
  53. body: |
  54. update searx.data - ${{ matrix.fetch }}
  55. labels: |
  56. data
  57. - name: Check outputs
  58. run: |
  59. echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
  60. echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"