notification-scheduled #56
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 12 * * thu' # 日本時間の21時に実行 | |
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 | |