Update Cyberwatch RSS Feed #14442
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: Update Cyberwatch RSS Feed | |
on: | |
schedule: | |
- cron: '30 * * * *' | |
workflow_dispatch: | |
# to consider: the use of action jobs to breakout each task | |
# https://docs.github.com/en/actions/learn-github-actions/essential-features-of-github-actions#sharing-data-between-jobs | |
jobs: | |
run-cyberwatch: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 170 | |
environment: CI | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
pip3 install -r requirements.txt | |
- name: Generate RSS Feed | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API }} | |
ATRANS_API_KEY: ${{ secrets.AZURE_TRANSL_API }} | |
run: | | |
python3 rss.py | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
repository: ./ | |
push_options: --force | |
- name: Save changes | |
run: | | |
DATE=$(date -Iseconds) | |
git config user.name github-actions | |
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
git pull origin main | |
git commit --all --message "Updated by Crontab on $DATE" || echo "no changes to commit" | |
git push origin main |