Skip to content

Run the importer

Run the importer #209

Workflow file for this run

name: Run the importer
on:
# pull_request:
# branches: [ master ]
schedule:
# run at 7:00 AM every Monday and Thursday
- cron: '0 7 * * 1,4'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
# https://github.com/actions/cache/blob/main/examples.md#using-pip-to-get-cache-location
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install -r requirements.txt
- name: Prepare user-password.py
env:
USERNAME: ${{ secrets.PYWIKIBOT_USERNAME }}
PASSWORD: ${{ secrets.PYWIKIBOT_PASSWORD }}
run: |
echo "('commons', 'commons', '${USERNAME}', '${PASSWORD}')" > user-password.py
chmod 600 user-password.py
# should be 291f608b9b61853a21413daffbb25de0
md5sum user-password.py
- name: Run the importer
env:
# set up HTTP(S) proxy for requests library
# https://docs.python-requests.org/en/master/user/advanced/#socks
# e.g. socks5://example.com:12345
HTTP_PROXY: ${{ secrets.HTTP_PROXY }}
HTTPS_PROXY: ${{ secrets.HTTP_PROXY }}
run: |
make harvest