loldriver Data Processing #78
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: loldriver Data Processing | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Runs every day | |
workflow_dispatch: | |
jobs: | |
process-data: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install requests | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests | |
- name: Run the script | |
run: python Lists/Drivers/get_loldriver_list.py | |
- name: List files in the root directory | |
run: ls -la | |
- name: List files in the Lists/Drivers directory | |
run: ls -la Lists/Drivers/ | |
- name: Move output files to correct directory (if necessary) | |
run: | | |
mv loldrivers_list.csv loldrivers_only_hashes_list.csv Lists/Drivers/ || echo "File not found in root." | |
mv malicious_bootloaders_only_hashes_list.csv malicious_bootloaders_list.csv Lists/Drivers/ || echo "File not found in root." | |
- name: Commit and Push Changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add Lists/Drivers/loldrivers_list.csv Lists/Drivers/loldrivers_only_hashes_list.csv Lists/Drivers/malicious_bootloaders_list.csv Lists/Drivers/malicious_bootloaders_only_hashes_list.csv | |
git commit -m "Update loldrivers list" --allow-empty | |
git push |