data-update.yml 2.2 KB

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