Skip to content

Update monthly investment positions #1441

Update monthly investment positions

Update monthly investment positions #1441

name: Update monthly investment positions
on:
schedule:
# 6:30 and 12:30 UTC daily
- cron: "30 6,12 * * *"
# Every 5 minutes, only for testing
# - cron: "*/5 * * * *"
jobs:
scheduled-positions-update:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: appToken
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
ref: main
token: ${{ steps.appToken.outputs.token }}
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: npm install
- run: npm run update-positions
- run: git add _data/positions.json
- uses: dsanders11/github-app-commit-action@v1
with:
message: update investment positions
token: ${{ steps.appToken.outputs.token }}
fail-on-no-changes: false