Skip to content

Commit

Permalink
2
Browse files Browse the repository at this point in the history
  • Loading branch information
jason5ng32 committed Feb 25, 2024
1 parent 3fcd64b commit f65cfbc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/autogen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Generate ics files

on:
schedule:
- cron: '*/30 * * * *'
- cron: '*/8 * * * *'

jobs:
run-scripts:
Expand All @@ -11,6 +11,11 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Reset local changes
run: |
git fetch origin main
git reset --hard origin/main
- name: Set up Node.js
uses: actions/setup-node@v2
with:
Expand All @@ -22,13 +27,14 @@ jobs:
- name: Run genAllIcs script
run: node ./api/github_gen.js
env:
SHOULD_GEN_SELECTED: ${{ secrets.SHOULD_GEN_SELECTED }}
SHOULD_GEN_ALL: ${{ secrets.SHOULD_GEN_ALL }}
SHOULD_GEN_SELECTED: ${{ vars.SHOULD_GEN_SELECTED }}
SHOULD_GEN_ALL: ${{ vars.SHOULD_GEN_ALL }}

- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git commit -m "Auto generated ics files" -a || echo "No changes to commit"
git push
git push --force
11 changes: 8 additions & 3 deletions .github/workflows/autoget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Get Earnings Calendar Data

on:
schedule:
- cron: '*/30 * * * *'
- cron: '*/5 * * * *'

jobs:
run-scripts:
Expand All @@ -11,6 +11,11 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Reset local changes
run: |
git fetch origin main
git reset --hard origin/main
- name: Set up Node.js
uses: actions/setup-node@v2
with:
Expand All @@ -22,8 +27,8 @@ jobs:
- name: Run fetchEarningsCalendarData script
run: node ./api/github_get.js
env:
SHOULD_GEN_SELECTED: ${{ secrets.SHOULD_GEN_SELECTED }}
SHOULD_GEN_ALL: ${{ secrets.SHOULD_GEN_ALL }}
SHOULD_GEN_SELECTED: ${{ vars.SHOULD_GEN_SELECTED }}
SHOULD_GEN_ALL: ${{ vars.SHOULD_GEN_ALL }}

- name: Commit files
run: |
Expand Down

0 comments on commit f65cfbc

Please sign in to comment.