Ethical AI Assessment #5
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: Ethical AI Assessment | |
# Controls when the action will run. | |
on: | |
schedule: | |
# Runs at 00:00 UTC every Sunday | |
- cron: '0 0 * * 0' | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
run-assessment: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
# Sets up a Python environment | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
# Install dependencies | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
# Run the script | |
- name: Run Ethical AI Assessment | |
run: python ethical_ai_assessment.py | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
# Commit and push if changes are made | |
- name: Commit and push changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add -A | |
git commit -m "Update Ethical AI Assessment Results" -a || echo "No changes to commit" | |
git push |