summaryrefslogtreecommitdiff
path: root/.github/workflows/data-update.yml
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-02-25 08:41:17 +0100
committerGitHub <noreply@github.com>2021-02-25 08:41:17 +0100
commit728e09676400221a064627509a31470d8f6e33bf (patch)
treed5e435a7393f6d5053ea52dd222470fa1b98307b /.github/workflows/data-update.yml
parentbc590cbc479fc10c98fefac159cfcacdf3fc75c1 (diff)
downloadsearxng-728e09676400221a064627509a31470d8f6e33bf.tar.gz
searxng-728e09676400221a064627509a31470d8f6e33bf.zip
data-update.yml: on PR per file
Diffstat (limited to '.github/workflows/data-update.yml')
-rw-r--r--.github/workflows/data-update.yml35
1 files changed, 21 insertions, 14 deletions
diff --git a/.github/workflows/data-update.yml b/.github/workflows/data-update.yml
index 8d35e5856..c9c6b29a4 100644
--- a/.github/workflows/data-update.yml
+++ b/.github/workflows/data-update.yml
@@ -1,13 +1,22 @@
name: "Update searx.data"
on:
schedule:
- - cron: "05 16 * * 5"
+ - cron: "05 08 * * 5"
jobs:
updateData:
- name: Update data
+ name: Update data - ${{ matrix.fetch }}
runs-on: ubuntu-20.04
if: ${{ github.repository_owner == 'searx'}}
+ strategy:
+ matrix:
+ fetch:
+ - ahmia_blacklist
+ - currencies
+ - external_bangs
+ - firefox_version
+ - languages
+ - wikidata_units
steps:
- name: Checkout
uses: actions/checkout@v2
@@ -27,39 +36,37 @@ jobs:
uses: actions/cache@v2
with:
path: ./local
- key: python-${{ matrix.os }}-3.9-${{ hashFiles('requirements*.txt', 'setup.py') }}
-
+ key: python-ubuntu-20.04-3.9-${{ hashFiles('requirements*.txt', 'setup.py') }}
+
- name: Install Python dependencies
if: steps.cache-python.outputs.cache-hit != 'true'
run: |
make V=1 install
- name: Fetch data
+ env:
+ FETCH_SCRIPT: utils/fetch_${{ matrix.fetch }}.py
run: |
source local/py3/bin/activate
- python utils/fetch_firefox_version.py
- python utils/fetch_languages.py
- python utils/fetch_ahmia_blacklist.py
- python utils/fetch_wikidata_units.py
- python utils/fetch_currencies.py
+ python $FETCH_SCRIPT
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.DATA_PR_TOKEN }}
- commit-message: Update searx.data
+ commit-message: Update searx.data - ${{ matrix.fetch }}
committer: searx-bot <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
- branch: automatic-update-data
+ branch: update_data_${{ matrix.fetch }}
delete-branch: true
- title: 'Update searx.data'
+ draft: false
+ title: 'Update searx.data - ${{ matrix.fetch }}'
body: |
- Update searx.data
+ Update searx.data - ${{ matrix.fetch }}
labels: |
data
- draft: false
- name: Check outputs
run: |