fix saving blackouts.json
This commit is contained in:
17
.github/workflows/run-script.yml
vendored
17
.github/workflows/run-script.yml
vendored
@@ -1,13 +1,13 @@
|
||||
name: Run Script
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
- cron: "30 */3 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
run-script:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -32,7 +32,18 @@ jobs:
|
||||
env:
|
||||
BARGHEMAN_TOKEN: ${{ secrets.BARGHEMAN_TOKEN }}
|
||||
EITAAYAR_TOKEN: ${{ secrets.EITAAYAR_TOKEN }}
|
||||
BLACKOUTS_FILE: "blackouts.json"
|
||||
BILL_IDS: ${{ secrets.BILL_IDS }}
|
||||
CHAT_ID: ${{ secrets.CHAT_ID }}
|
||||
run: |
|
||||
python main.py
|
||||
|
||||
- name: Commit & Push updated data
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
git config --global user.name "github-actions"
|
||||
git config --global user.email "github-actions@github.com"
|
||||
git add blackouts.json
|
||||
git commit -m "Update outage data" || echo "Nothing to commit"
|
||||
git push
|
||||
|
||||
Reference in New Issue
Block a user