everyday-birthday #1604
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: everyday-birthday | |
on: | |
schedule: | |
- cron: "1 15 * * *" | |
workflow_dispatch: {} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: npm install | |
run: npm install | |
- name: run (retry at most 3 times including 1st try) | |
run: npm run index || (sleep 60 && npm run index) || (sleep 60 && npm run index) | |
env: | |
TWITTER_ID: ${{ secrets.TWITTER_ID }} | |
PASSWORD: ${{ secrets.PASSWORD }} | |
YEAR: ${{ secrets.YEAR }} | |
MAIL: ${{ secrets.MAIL }} | |
TOTP_SECRET: ${{ secrets.TOTP_SECRET }} | |
- name: Setup a-know/pi | |
uses: peaceiris/actions-pixela@v2 | |
with: | |
pi_version: '1.2.0' | |
- name: Increment | |
env: | |
PIXELA_USER_TOKEN: ${{ secrets.PIXELA_USER_TOKEN }} | |
run: | | |
pi pixel increment -u gecko655 -g birthdays | |
- name: Slack Notification on Failure | |
uses: rtCamp/[email protected] | |
if: failure() | |
env: | |
SLACK_CHANNEL: general | |
SLACK_MESSAGE: Failed to make today as birthday | |
SLACK_COLOR: danger | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} |