This repository has been archived by the owner on May 11, 2024. It is now read-only.
Notify Daily #513
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: Notify Daily | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 15 * * *' | |
jobs: | |
notify: | |
name: 'opime notify daily' | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: update pip | |
run: pip install -U pip setuptools wheel | |
- name: install poetry | |
run: pip install poetry poetry-dynamic-versioning | |
- name: install libraries | |
run: poetry install --no-dev | |
- name: run notify | |
run: | | |
date | |
TMPFILE=`mktemp` | |
echo "${GOOGLE_JSON_KEY_DATA}" | base64 -d > ${TMPFILE} | |
echo "8ff48bc60da0a73e72990fc619d3f61b736d7ac00d526744e3f74a63aecdd51f ${TMPFILE}" > secret.sha256sum | |
sha256sum secret.sha256sum | |
poetry run fetch-schedule --google-json-key ${TMPFILE} | |
rm ${TMPFILE} | |
env: | |
GOOGLE_JSON_KEY_DATA: ${{ secrets.GOOGLE_JSON_KEY_DATA }} | |
LINE_ACCESS_TOKEN: ${{ secrets.LINE_ACCESS_TOKEN }} | |
GSHEET_ID: ${{ secrets.GSHEET_ID }} | |
TZ: 'Asia/Tokyo' |