This repository has been archived by the owner on Sep 9, 2024. It is now read-only.
Execute Script #580
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
# This workflow executes the main Python script | |
name: Execute Script | |
on: | |
schedule: | |
- cron: "0 0,12 * * *" | |
jobs: | |
execute-script: | |
name: Execute Script | |
runs-on: ubuntu-latest | |
env: | |
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL}} | |
FACTS_API_KEY: ${{ secrets.FACTS_API_KEY}} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
token: ${{ secrets.GH_PAT }} | |
- name: Install Python Dependencies | |
run: pip install -r requirements.txt | |
shell: bash | |
- name: Run Python Script | |
run: python main.py | |
shell: bash | |
- name: Commit Historical Facts | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
branch: main | |
commit_message: "ci: update historical facts" | |
file_pattern: history.json |