Update monthly investment positions #1770
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: 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 |