๐ Monthly tasks #14
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: "๐ Monthly tasks" | |
on: | |
schedule: | |
- cron: "0 0 1 * *" | |
workflow_dispatch: | |
inputs: | |
year: | |
description: "Year" | |
required: false | |
month: | |
description: "Month" | |
required: false | |
jobs: | |
run-monthly-tasks: | |
name: "๐ท Run monthly tasks" | |
runs-on: ubuntu-latest | |
env: | |
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }} | |
GOOGLE_SHEETS_API_KEY: ${{ secrets.GOOGLE_SHEETS_API_KEY }} | |
steps: | |
- name: "๐ฆ Checkout" | |
uses: actions/checkout@v3 | |
- name: "๐ Set up Bun" | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: "โ Install dependencies" | |
run: bun install | |
- name: "๐ Create workout key result for given month" | |
if: "${{ github.event.inputs.year != '' && github.event.inputs.month != '' }}" | |
run: bun run cli create-monthly-workout-key-result -y ${{ github.event.inputs.year }} -m ${{ github.event.inputs.month }} | |
- name: "๐ Create workout key result for current month" | |
if: "${{ github.event.inputs.year == '' && github.event.inputs.month == '' }}" | |
run: bun run cli create-monthly-workout-key-result | |
deploy: | |
name: "โ๏ธ" | |
needs: [run-monthly-tasks] | |
uses: krimlabs/state-of-being/.github/workflows/cd.yml@master | |
secrets: inherit |