Generate ics files #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate ics files | |
on: | |
schedule: | |
- cron: '*/8 * * * *' | |
jobs: | |
run-scripts: | |
runs-on: ubuntu-latest | |
environment: OhEarningCal | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20.10.0' | |
- name: Install dependencies | |
run: npm install | |
- 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 }} | |
- name: Commit files | |
run: | | |
git config --local user.email "action@github.com" | |
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 |