notification-scheduled #68
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: notification-scheduled | |
on: | |
schedule: | |
- cron: '0 18 * * tue' # 日本時間で水曜日の3時に実行 (UTCで火曜日の18時) | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
MIDRA_LAB_NOTION_API: ${{ secrets.MIDRA_LAB_NOTION_API }} | |
NOTION_DATABASE_URL: ${{ secrets.NOTION_DATABASE_URL }} | |
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} | |
steps: | |
- uses: actions/[email protected] | |
- name: create env file | |
run: | | |
touch .env | |
echo "MIDRA_LAB_NOTION_API=${MIDRA_LAB_NOTION_API}" >> .env | |
echo "NOTION_DATABASE_URL=${NOTION_DATABASE_URL}" >> .env | |
echo "DISCORD_WEBHOOK_URL=${DISCORD_WEBHOOK_URL}" >> .env | |
- name: Build | |
run: | | |
docker-compose up -d --build | |
- name: Run | |
run: | | |
docker-compose run mtg-notification go run main.go discord_messenger.go notion_page_title_patch.go | |