Skip to content

WHOTS Metadata

WHOTS Metadata #76

Workflow file for this run

name: WHOTS Metadata
on:
push:
workflow_dispatch:
schedule:
- cron: "0 0 1 * *"
jobs:
scheduled:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- name: Check-out repository
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
conda env update --file environment.yml --name base
echo "Conda environment created"
- name: Activate conda and verify installation
run: |
source $CONDA/bin/activate base
conda info --envs
which python
python --version
conda list
which scrapy
- name: Fetch latest WHOTS data
working-directory: ./src/whots_metadata
run: |
source $CONDA/bin/activate base
scrapy crawl whotsmetadata -O ../../results/items.json
- name: Commit and push if it changed
run: |
git config user.name "Automated"
git config user.email "[email protected]"
git add -A
timestamp=$(date -u)
git commit -m "Latest WHOTS Metadata: ${timestamp}" || exit 0
git push