run main.py #1971
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: run main.py | |
on: | |
push: | |
branches: | |
- "main" | |
workflow_dispatch: # Enables manual trigger without additional inputs | |
schedule: | |
- cron: "0 * * * *" # Every hour | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo content | |
uses: actions/checkout@v2 # checkout the repository content to github runner | |
- name: setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" # install the python version needed | |
- name: install python packages | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: execute py script # run main.py | |
env: | |
# Required secrets | |
HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
ARGILLA_API_URL: ${{ secrets.ARGILLA_API_URL }} | |
ARGILLA_API_KEY: ${{ secrets.ARGILLA_API_KEY }} | |
SOURCE_DATASET: ${{ secrets.SOURCE_DATASET }} | |
HF_DATASET_RESULTS: ${{ secrets.HF_DATASET_RESULTS }} | |
# Optional secrets and defaults | |
REQUIRED_RESPONSES: ${{ secrets.REQUIRED_RESPONSES }} | |
RESULTS_DATASET: ${{ secrets.RESULTS_DATASET }} | |
SOURCE_WORKSPACE: ${{ secrets.SOURCE_WORKSPACE }} | |
RESULTS_WORKSPACE: ${{ secrets.RESULTS_WORKSPACE }} | |
DELETE_SOURCE_RECORDS: ${{ secrets.DELETE_SOURCE_RECORDS }} | |
run: python main.py | |