Skip to content

๐Ÿ•› Set workout KR current prop #4

๐Ÿ•› Set workout KR current prop

๐Ÿ•› Set workout KR current prop #4

name: "๐Ÿ•› Set workout KR current prop"
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
inputs:
year:
description: "Year"
required: false
month:
description: "Month"
required: false
jobs:
set-workout-kr-current:
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@v2
- name: "๐Ÿ” Set up Bun"
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: "โœ… Install Dependencies"
run: bun install
- name: "๐Ÿƒโ€โ™‚๏ธ Fetch value and set on Notion with given year and month"
if: "${{ github.event.inputs.year != '' && github.event.inputs.month != '' }}"
run: bun run cli set-current-value-of-workout-key-result -y ${{ github.event.inputs.year }} -m ${{ github.event.inputs.month }}
- name: "๐Ÿƒโ€โ™‚๏ธ Fetch value and set on Notion with default year and month"
if: "${{ github.event.inputs.year == '' && github.event.inputs.month == '' }}"
run: bun run cli set-current-value-of-workout-key-result