This repository has been archived by the owner on May 11, 2024. It is now read-only.
Notify #29770
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 | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '*/20 * * * *' | |
jobs: | |
notify: | |
name: 'opime notify' | |
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 opime-notify --google-json-key ${TMPFILE} | |
poetry run opime-notify-realtime --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' |