Fetch CPU Library #274
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: Fetch CPU Library | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 12 * * *' | |
jobs: | |
libfetch: | |
name: Fetch Library | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r ./requirements.txt | |
- name: Fetch CPU library | |
run: | | |
python -u ./main.py | |
- name: Upload rule File | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cpu_lib | |
path: ./cpu_lib.yaml | |
- name: Upload to server | |
env: | |
HOST: ${{ secrets.HOST }} | |
DESTINATION: ${{ secrets.DESTINATION }} | |
USER: ${{ secrets.USER }} | |
PASSWORD: ${{ secrets.PASSWORD }} | |
run: | | |
curl -T ./cpu_lib.yaml "${HOST}${DESTINATION}/cpu_lib.yaml" -u ${USER}:${PASSWORD} |