This repository has been archived by the owner on Jan 6, 2025. It is now read-only.
Send daily budget notification #24
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
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Send daily budget notification | |
on: | |
workflow_dispatch: | |
# schedule time is UTC. 12pm UTC = 7am EST | |
schedule: | |
- cron: "0 12 * * *" | |
env: | |
SENDGRID_TOKEN: ${{ secrets.SENDGRID_TOKEN }} | |
SENDGRID_TEMPLATE_ID: ${{ secrets.SENDGRID_TEMPLATE_ID }} | |
SENDGRID_MAIL_FROM: ${{ secrets.SENDGRID_MAIL_FROM }} | |
SENDGRID_MAIL_FROM_NAME: "Budget Notification Service - GitHub Action" | |
SENDGRID_MAIL_TO: ${{ secrets.SENDGRID_MAIL_TO }} | |
YNAB_TOKEN: ${{ secrets.YNAB_TOKEN }} | |
YNAB_BUDGET_ID: ${{ secrets.YNAB_BUDGET_ID }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.23' | |
# it should be possible to cache dependencies... but let's make this work first. | |
# cache-dependency-path: go.sum | |
- name: Build | |
run: go run ./cmd/ynot/main.go | |