-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (38 loc) · 1.31 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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