data-update.yml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. ---
  2. name: Update searx.data
  3. # yamllint disable-line rule:truthy
  4. on:
  5. workflow_dispatch:
  6. schedule:
  7. - cron: "59 23 28 * *"
  8. concurrency:
  9. group: ${{ github.workflow }}-${{ github.ref_name }}
  10. cancel-in-progress: false
  11. permissions:
  12. contents: read
  13. env:
  14. PYTHON_VERSION: "3.13"
  15. jobs:
  16. data:
  17. if: github.repository_owner == 'searxng'
  18. name: ${{ matrix.fetch }}
  19. runs-on: ubuntu-24.04-arm
  20. strategy:
  21. fail-fast: false
  22. matrix:
  23. fetch:
  24. - update_ahmia_blacklist.py
  25. - update_currencies.py
  26. - update_external_bangs.py
  27. - update_firefox_version.py
  28. - update_engine_traits.py
  29. - update_wikidata_units.py
  30. - update_engine_descriptions.py
  31. permissions:
  32. contents: write
  33. pull-requests: write
  34. steps:
  35. - name: Setup Python
  36. uses: actions/setup-python@v5
  37. with:
  38. python-version: "${{ env.PYTHON_VERSION }}"
  39. - name: Checkout
  40. uses: actions/checkout@v4
  41. with:
  42. persist-credentials: "false"
  43. - name: Setup cache Python
  44. uses: actions/cache@v4
  45. with:
  46. key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
  47. restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
  48. path: "./local/"
  49. - name: Setup venv
  50. run: make V=1 install
  51. - name: Fetch data
  52. run: V=1 ./manage pyenv.cmd python "./searxng_extra/update/${{ matrix.fetch }}"
  53. - name: Create PR
  54. id: cpr
  55. uses: peter-evans/create-pull-request@v7
  56. with:
  57. author: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
  58. committer: "searxng-bot <searxng-bot@users.noreply.github.com>"
  59. title: "[data] update searx.data - ${{ matrix.fetch }}"
  60. commit-message: "[data] update searx.data - ${{ matrix.fetch }}"
  61. branch: "update_data_${{ matrix.fetch }}"
  62. delete-branch: "true"
  63. draft: "false"
  64. signoff: "false"
  65. labels: |
  66. data
  67. - name: Display information
  68. run: |
  69. echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
  70. echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"