Skip to content

Commit

Permalink
chore: update github action auto push
Browse files Browse the repository at this point in the history
  • Loading branch information
niracler committed Jul 18, 2024
1 parent 4c1b47c commit 63ddaad
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/random.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,16 @@ jobs:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHANNEL_ID: ${{ secrets.TELEGRAM_CHANNEL_ID }}
run: python3 rand.py
run: python3 rand.py

- name: Commit
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
git config --local user.email "[email protected]"
git config --local user.name "nyaruko"
git add README.md table.csv
git commit -m "Random Dare $(date +'%Y-%m-%d')"
# git push through the token
git remote set-url origin "https://[email protected]/niracler/random.git"
git push origin main
2 changes: 1 addition & 1 deletion rand.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Constants
GH_TOKEN = os.getenv('GH_TOKEN')
USERNAME = "niracler"
CHANNEL_ID = os.getenv('TELEGRAM_CHANNEL_ID', '-1001921875703')
CHANNEL_ID = "-1001921875703" # os.getenv('TELEGRAM_CHANNEL_ID', '-1001921875703')
BOT_TOKEN = os.getenv('TELEGRAM_BOT_TOKEN')
BASE_URL = f"https://api.telegram.org/bot{BOT_TOKEN}"
READ_ME_PATH = 'README.md'
Expand Down

0 comments on commit 63ddaad

Please sign in to comment.