๐ Create monthly workout KR #2
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: "๐ Create monthly workout KR" | |
on: | |
schedule: | |
- cron: "0 0 1 * *" | |
workflow_dispatch: | |
inputs: | |
year: | |
description: "Year" | |
required: false | |
month: | |
description: "Month" | |
required: false | |
jobs: | |
create-monthly-workout-kr: | |
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 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 Key Result for current month" | |
if: "${{ github.event.inputs.year == '' && github.event.inputs.month == '' }}" | |
run: bun run cli create-monthly-workout-key-result |