data-update.yml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 }}
  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. - update_tracker_patterns.py
  32. permissions:
  33. contents: write
  34. pull-requests: write
  35. steps:
  36. - name: Setup Python
  37. uses: actions/setup-python@v5
  38. with:
  39. python-version: "${{ env.PYTHON_VERSION }}"
  40. - name: Checkout
  41. uses: actions/checkout@v4
  42. with:
  43. persist-credentials: "false"
  44. - name: Setup cache Python
  45. uses: actions/cache@v4
  46. with:
  47. key: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-${{ hashFiles('./requirements*.txt') }}"
  48. restore-keys: "python-${{ env.PYTHON_VERSION }}-${{ runner.arch }}-"
  49. path: "./local/"
  50. - name: Setup venv
  51. run: make V=1 install
  52. - name: Fetch data
  53. run: V=1 ./manage pyenv.cmd python "./searxng_extra/update/${{ matrix.fetch }}"
  54. - name: Create PR
  55. id: cpr
  56. uses: peter-evans/create-pull-request@v7
  57. with:
  58. author: "searxng-bot <searxng-bot@users.noreply.github.com>"
  59. committer: "searxng-bot <searxng-bot@users.noreply.github.com>"
  60. title: "[data] update searx.data - ${{ matrix.fetch }}"
  61. commit-message: "[data] update searx.data - ${{ matrix.fetch }}"
  62. branch: "update_data_${{ matrix.fetch }}"
  63. delete-branch: "true"
  64. draft: "false"
  65. signoff: "false"
  66. body: |
  67. [data] update searx.data - ${{ matrix.fetch }}
  68. labels: |
  69. data
  70. - name: Display information
  71. run: |
  72. echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
  73. echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"