Skip to content

.github/workflows/main.yml #13928

.github/workflows/main.yml

.github/workflows/main.yml #13928

Workflow file for this run

name: Poll HiveTalk Meetings
# pause this work flow for now to nostr relays
on:
schedule:
- cron: "*/15 * * * *" # Runs every 15 minutes
workflow_dispatch: # Allows manual triggering
jobs:
poll-and-post:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests python-dotenv nostr-sdk
- name: Run poll_meetinfo script
env:
NOSTR_PRIVATE_KEY_HEX: ${{ secrets.NOSTR_PRIVATE_KEY_HEX }} # Make sure to add this secret in your GitHub repo settings
HIVE_API_KEY: ${{ secrets.HIVE_API_KEY }}
run: python poll_meetinfo.py
- name: Commit and push changes
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add -f meetinfo.log
if ! git diff-index --quiet HEAD; then
git commit -m "Update meetinfo.log"
git push https://x-access-token:${{ secrets.PAT }}@github.com/${{ github.repository }}.git
else
echo "No changes to commit"
fi
env:
PAT: ${{ secrets.PAT }} # Use PAT for authentication