Download data from Samsung #128
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Download data from Samsung | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 7 * * *' | |
workflow_dispatch: | |
inputs: | |
name: | |
description: 'Why' | |
required: false | |
default: 'Because I want to update it now' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout dataherb-flora | |
uses: actions/checkout@v4 | |
- name: Get current directory and files | |
run: | | |
pwd | |
ls | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install Python Requirements | |
run: | | |
pip install -r scripts/requirements.txt | |
- name: Download new data | |
run: | | |
cd dataset | |
python ../scripts/samsung_device_update_scraper.py | |
- name: Update Data | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git status | |
git add . | |
git commit -m "Update Datasets" || echo "Nothing to update" | |
git status | |
- name: Push changes to repo | |
uses: ad-m/github-push-action@master | |
with: | |
branch: main |